-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (89 loc) · 2.27 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: gleam-cake
networks:
gleam-cake-test:
name: gleam-cake-test
services:
postgres:
container_name: gleam-cake-test-postgres
networks:
- gleam-cake-test
image: postgres:latest
restart: unless-stopped
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=gleam_cake_test
ports:
- "127.0.0.1:5432:5432"
volumes:
- ./docker/data/postgres-data:/var/lib/postgresql/data
# - ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "db_prod"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
mariadb:
container_name: gleam-cake-test-mariadb
dns:
- 1.1.1.1
- 127.0.0.11
image: "mariadb:latest"
restart: unless-stopped
environment:
MARIADB_DATABASE: "gleam_cake_test"
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: true
MYSQL_TCP_PORT: 3306
MARIADB_TCP_PORT: 3306
ports:
- "127.0.0.1:3307:3306"
volumes:
- ./docker/data/maria-data:/var/lib/mysql
command:
[
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--lower_case_table_names=1",
]
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--innodb_initialized"]
start_period: 5s
timeout: 5s
interval: 5s
retries: 5
mysql:
container_name: gleam-cake-test-mysql
dns:
- 1.1.1.1
- 127.0.0.11
image: "mysql:latest"
restart: unless-stopped
environment:
MYSQL_DATABASE: "gleam_cake_test"
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_TCP_PORT: 3306
ports:
- "127.0.0.1:3308:3306"
volumes:
- ./docker/data/mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--innodb_initialized"]
start_period: 5s
timeout: 5s
interval: 5s
retries: 5
command:
[
"mysqld",
"--character-set-server=utf8mb4",
"--collation-server=utf8mb4_unicode_ci",
"--lower_case_table_names=1",
]
depends_on:
mariadb:
# condition: service_healthy
condition: service_started
restart: true
volumes:
gleam-cake-test: