-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
43 lines (43 loc) · 927 Bytes
/
docker-compose.yaml
File metadata and controls
43 lines (43 loc) · 927 Bytes
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
services:
api:
build: ./
restart: unless-stopped
env_file:
- .env.local
depends_on:
mysql:
condition: service_healthy
volumes:
- .local-secrets:/secrets
networks:
- api
- db
ports:
- "8000:8000"
healthcheck:
test: wget --no-verbose --tries=1 --spider http://127.0.0.1:8000/healthcheck || exit 1
interval: 5s
start_period: 2s
start_interval: 3s
mysql:
image: "mysql"
restart: unless-stopped
env_file:
- ./db/.env.local
volumes:
- mysql_data:/var/lib/mysql
- ./db/data/init.sql.local:/docker-entrypoint-initdb.d/init.sql
- .local-secrets:/secrets
networks:
- db
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "--silent"]
interval: 5s
timeout: 3s
retries: 8
start_period: 0s
volumes:
mysql_data:
networks:
api:
db: