-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
46 lines (46 loc) · 1.09 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
37
38
39
40
41
42
43
44
45
46
version: '3'
services:
web:
build: .docker/web
ports:
- "${WEB_PORT}:80"
volumes:
- ./:/var/www/html/
- .docker/web/apache.conf:/etc/apache2/sites-enabled/000-default.conf
environment:
DB_USER:
DB_NAME:
DB_PASSWORD:
POSTGRES_PORT: "5432"
MARIADB_PORT: "3306"
links:
- postgres
- mariadb
tty: true
postgres:
image: postgres:11.2
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- pg_data:/var/lib/postgresql/data
- .docker/db/initdb.sql:/docker-entrypoint-initdb.d/initdb.sql
environment:
POSTGRES_USER: "${DB_USER}"
POSTGRES_DB: "${DB_NAME}"
POSTGRES_PASSWORD: "${DB_PASSWORD}"
tty: true
mariadb:
image: mariadb:10.4
ports:
- "${MARIADB_PORT}:3306"
volumes:
- mdb_data:/var/lib/mysql
- .docker/db/initdb.sql:/docker-entrypoint-initdb.d/initdb.sql
environment:
MYSQL_USER: "${DB_USER}"
MYSQL_DATABASE: "${DB_NAME}"
MYSQL_PASSWORD: "${DB_PASSWORD}"
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD}"
volumes:
pg_data:
mdb_data: