-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
31 lines (31 loc) · 943 Bytes
/
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
version: "3"
services:
postgres:
image: "postgres"
container_name: "sql_composer_postgres"
environment:
- POSTGRES_USER=runner
- POSTGRES_PASSWORD=${PG_DATABASE_PASS}
- POSTGRES_DB=sql_composer
# map 5432 to local port $PG_DATABASE_PORT
ports:
- "${PG_DATABASE_PORT}:5432"
# mount a dir as local volume to control the storage
# location. Without this the container will store
# data files elsewhere on the host fs.
volumes:
- ./db/postgres-data:/var/lib/postgresql/data
mysql:
image: "mysql"
# restart: "always"
container_name: "sql_composer_mysql"
environment:
- MYSQL_DATABASE=sql_composer
- MYSQL_USER=runner
- MYSQL_PASSWORD=${MYSQL_DATABASE_PASS}
- MYSQL_RANDOM_ROOT_PASSWORD=true
# map 5432 to local port $PG_DATABASE_PORT
ports:
- "${MYSQL_DATABASE_PORT}:3306"
volumes:
- ./db/mysql-data:/var/lib/mysql