Add db persistent volume
This commit is contained in:
parent
5e694b57e6
commit
977050f7a0
@ -16,6 +16,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
|
depends_on:
|
||||||
|
- api
|
||||||
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
@ -30,9 +32,11 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
# This is only for testing
|
# This is only for testing
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
|
volumes:
|
||||||
|
- notes-db-volume:/var/lib/mysql
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||||
timeout: 20s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
|
||||||
|
|
||||||
@ -49,4 +53,7 @@ services:
|
|||||||
- MYSQL_HOST=db
|
- MYSQL_HOST=db
|
||||||
depends_on:
|
depends_on:
|
||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
notes-db-volume:
|
||||||
Loading…
x
Reference in New Issue
Block a user