web/docker-compose-dev.yml

82 lines
1.6 KiB
YAML
Raw Normal View History

# https://blog.thelazyfox.xyz/how-to-create-healthchecks-for-docker/
version: '3.7'
2024-02-07 11:17:07 +00:00
services:
caddy:
build:
context: ./
dockerfile: ./DockerfileCaddy
cap_add:
- NET_ADMIN
2024-02-07 11:17:07 +00:00
ports:
- "6752:6752"
volumes:
- ./CaddyfileDev:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- web_network
healthcheck:
test: ["CMD-SHELL", "curl http://caddy:6752/ --max-time 80"]
2024-02-07 11:17:07 +00:00
interval: 30s
start_period: 20s
timeout: 80s
2024-02-07 11:17:07 +00:00
retries: 3
restart: always
2024-02-07 11:17:07 +00:00
web:
build:
context: ./
dockerfile: ./Dockerfile
2024-02-07 11:17:07 +00:00
command: python3 -m server server
volumes:
- .:/app
expose:
- 7080
networks:
- web_network
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:7080/ --max-time 60"]
2024-02-07 11:17:07 +00:00
interval: 30s
start_period: 20s
timeout: 80s
2024-02-07 11:17:07 +00:00
retries: 3
restart: always
2024-02-23 08:41:33 +00:00
mem_limit: 2g
2024-02-07 11:17:07 +00:00
dragonfly:
image: 'docker.dragonflydb.io/dragonflydb/dragonfly'
ulimits:
memlock: -1
expose:
- 6379
networks:
- web_network
volumes:
- dragonflydata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
start_period: 20s
2024-02-07 11:17:07 +00:00
timeout: 10s
retries: 3
restart: always
autoheal:
restart: always
image: willfarrell/autoheal
environment:
- AUTOHEAL_CONTAINER_LABEL=all
volumes:
- /var/run/docker.sock:/var/run/docker.sock
2024-02-07 11:17:07 +00:00
volumes:
caddy_data:
caddy_config:
dragonflydata:
networks:
web_network:
driver: bridge