-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
36 lines (36 loc) · 1.21 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
36
version: "3.5"
# define all services
services:
quickstart:
# we want to use the image which is build from our Dockerfile
build:
context: .
# 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.quickstart.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.quickstart.com.br
- MYSQL_USERNAME=root
- MYSQL_PASSWORD=root
mysql.localhost.quickstart.com.br:
image: mariadb:10.5.9
# we mount a datavolume to make sure we don't loose data
volumes:
- mariadb_data:/var/lib/mysql
- ./mysql/db:/var/lib/mysql/db
# setting some envvars to create the DB
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=quickstart
- TZ=America/Sao_Paulo
ports:
- 3306:3306
volumes:
mariadb_data: