fix_2
This commit is contained in:
@@ -2,15 +2,13 @@ services:
|
|||||||
nginx:
|
nginx:
|
||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "8080:80"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-z", "localhost", "80"]
|
test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 15
|
retries: 15
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
command: >
|
|
||||||
sh -c "apt-get update && apt-get install -y netcat && nginx -g 'daemon off;'"
|
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
@@ -21,26 +19,22 @@ services:
|
|||||||
POSTGRES_USER: user
|
POSTGRES_USER: user
|
||||||
POSTGRES_PASSWORD: password
|
POSTGRES_PASSWORD: password
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "nc", "-z", "localhost", "5432"]
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB} || exit 1"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 15
|
retries: 15
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
command: >
|
|
||||||
sh -c "apt-get update && apt-get install -y netcat && docker-entrypoint.sh postgres"
|
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:latest
|
image: redis:latest
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "sh", "-c", "nc -z localhost 6379 || exit 1"]
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG || exit 1"]
|
||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 15
|
retries: 15
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
command: >
|
|
||||||
sh -c "apk add --no-cache netcat-openbsd && redis-server"
|
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user