feat: add health checks and restart policies in docker-compose, update Telegraf configuration
This commit is contained in:
@@ -22,22 +22,29 @@ services:
|
||||
- DATABASE=${TELEGRAF_MONGODB_DATABASE:?"Database name is required"}
|
||||
- DSN=${TELEGRAF_MONGODB_DSN:?"DSN is required"}
|
||||
- HOSTNAME=${TELEGRAF_HOSTNAME:?"Hostname is required"}
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080"]
|
||||
interval: 5s
|
||||
timeout: 10s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- backend
|
||||
|
||||
collector:
|
||||
container_name: collector
|
||||
#image: gitea.kobim.cloud/kobim/peertube-collector
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: gitea.kobim.cloud/kobim/peertube-collector
|
||||
#build:
|
||||
#context: .
|
||||
#dockerfile: Dockerfile
|
||||
depends_on:
|
||||
selenium:
|
||||
condition: service_healthy
|
||||
telegraf:
|
||||
condition: service_started
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- VIDEO_URL=${VIDEO_URL:?"Video URL is required"}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9092:9092"
|
||||
extra_hosts:
|
||||
|
Reference in New Issue
Block a user