Add db persistent volume

This commit is contained in:
Hubert Van De Walle 2020-04-30 15:30:30 +02:00
parent 5e694b57e6
commit 977050f7a0

View File

@ -16,6 +16,8 @@ services:
ports:
- 80:80
- 443:443
depends_on:
- api
db:
@ -30,9 +32,11 @@ services:
ports:
# This is only for testing
- 3306:3306
volumes:
- notes-db-volume:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 20s
timeout: 10s
retries: 10
@ -49,4 +53,7 @@ services:
- MYSQL_HOST=db
depends_on:
db:
condition: service_healthy
condition: service_healthy
volumes:
notes-db-volume: