mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2025-03-13 17:19:52 +00:00
Update docker-compose.yml
add healthchecks and depends_on
This commit is contained in:
parent
df759de44b
commit
0487485c06
@ -6,8 +6,13 @@ services:
|
||||
image: ghost:5-alpine
|
||||
container_name: ghost
|
||||
restart: always
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
expose:
|
||||
- 2368
|
||||
ports:
|
||||
- 8080:2368
|
||||
- 2368:2368
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/content:/var/lib/ghost/content
|
||||
environment:
|
||||
@ -39,6 +44,10 @@ services:
|
||||
image: mysql:8
|
||||
container_name: ghost_db
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$DB_ROOT_PASS' ]
|
||||
timeout: 20s
|
||||
retries: 10
|
||||
volumes:
|
||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/mysql:/var/lib/mysql
|
||||
expose:
|
||||
|
Loading…
x
Reference in New Issue
Block a user