-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
35 lines (35 loc) · 1.05 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: '2'
# define all services
services:
grow-base-laravel7:
# we want to use the image which is build from our Dockerfile
build: .
# apache is running on port 80 but we want to expose this to port 4000 on our local machine
ports:
- "4000:80"
# we depending on the mysql backend
depends_on:
- mysql.localhost.laravel7.com.br
# we mount the working dir into the container, handy for development
volumes:
- .:/var/www/html/
environment:
- SECURITY_SALT=ashjg23697sds97139871298ashk
- MYSQL_URL=mysql.localhost.laravel7.com.br
- MYSQL_USERNAME=root
- MYSQL_PASSWORD=root
mysql.localhost.laravel7.com.br:
# we use the mysql base image, version 5.6.36
image: mysql:5.6.36
# we mount a datavolume to make sure we don't loose data
volumes:
- mysql_data:/var/lib/mysql
- ./db:/var/lib/mysql/db
# setting some envvars to create the DB
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=base
ports:
- 3306:3306
volumes:
mysql_data: