mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2025-03-16 02:29:56 +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
|
image: ghost:5-alpine
|
||||||
container_name: ghost
|
container_name: ghost
|
||||||
restart: always
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
database:
|
||||||
|
condition: service_healthy
|
||||||
|
expose:
|
||||||
|
- 2368
|
||||||
ports:
|
ports:
|
||||||
- 8080:2368
|
- 2368:2368
|
||||||
volumes:
|
volumes:
|
||||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/content:/var/lib/ghost/content
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/content:/var/lib/ghost/content
|
||||||
environment:
|
environment:
|
||||||
@ -39,6 +44,10 @@ services:
|
|||||||
image: mysql:8
|
image: mysql:8
|
||||||
container_name: ghost_db
|
container_name: ghost_db
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root', '-p$$DB_ROOT_PASS' ]
|
||||||
|
timeout: 20s
|
||||||
|
retries: 10
|
||||||
volumes:
|
volumes:
|
||||||
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/mysql:/var/lib/mysql
|
- ${DOCKER_VOLUME_STORAGE:-/mnt/docker-volumes}/ghost/mysql:/var/lib/mysql
|
||||||
expose:
|
expose:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user