44 lines
871 B
YAML
44 lines
871 B
YAML
services:
|
|
nginx:
|
|
image: nginx:latest
|
|
ports:
|
|
- "8080:80"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost || exit 1"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 15
|
|
start_period: 5s
|
|
networks:
|
|
- app-network
|
|
|
|
postgres:
|
|
image: postgres:latest
|
|
environment:
|
|
POSTGRES_DB: mydb
|
|
POSTGRES_USER: user
|
|
POSTGRES_PASSWORD: password
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB}"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 15
|
|
start_period: 5s
|
|
networks:
|
|
- app-network
|
|
|
|
redis:
|
|
image: redis:latest
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "redis-cli ping | grep PONG || exit 1"]
|
|
interval: 5s
|
|
timeout: 10s
|
|
retries: 15
|
|
start_period: 5s
|
|
networks:
|
|
- app-network
|
|
|
|
networks:
|
|
app-network:
|
|
driver: bridge
|