-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
42 lines (42 loc) · 906 Bytes
/
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
32
33
34
35
36
37
38
39
40
41
42
version: "3.9"
volumes:
magische-db-data:
services:
app:
container_name: magische_app
image: magische
build:
target: dev
args:
- target=dev
env_file:
- .env
volumes:
- .:/app
ports:
- ${APP_CLIENT_PORT:-8080}:${PORT}
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:${PORT}/health"]
interval: 5s
timeout: 10s
retries: 10
start_period: 5s
depends_on:
db:
condition: service_healthy
db:
image: mysql:8.0
container_name: magische-db
env_file:
- .env
volumes:
- magische-db-data:/var/lib/mysql
- ./db/conf.d:/etc/mysql/conf.d:cached
ports:
- "${MYSQL_CLIENT_PORT:-3306}:3306"
healthcheck:
test: mysqladmin ping -u${MYSQL_USER} -p${MYSQL_PASSWORD}
interval: 2s
timeout: 1s
retries: 100
start_period: 1s