-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
32 lines (29 loc) · 1001 Bytes
/
docker-compose.yaml
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.4"
services:
postgres:
image: postgres:12-alpine
command: ["postgres", "-c", "log_statement=all"]
volumes:
- ./init_pg.sql:/docker-entrypoint-initdb.d/init.sql
container_name: multitenancy_example_postgres
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: "docker"
POSTGRES_DB: "test"
restart: on-failure
network_mode: bridge
mysql:
image: mysql:8.1
# NOTE: use of "mysql_native_password" is not recommended: https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password
# (this is just an example, not intended to be a production configuration)
restart: on-failure
command: --default-authentication-plugin=mysql_native_password
container_name: multitenancy_example_mysql
volumes:
- ./init_my.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "docker"
network_mode: bridge