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"}
|
- DATABASE=${TELEGRAF_MONGODB_DATABASE:?"Database name is required"}
|
||||||
- DSN=${TELEGRAF_MONGODB_DSN:?"DSN is required"}
|
- DSN=${TELEGRAF_MONGODB_DSN:?"DSN is required"}
|
||||||
- HOSTNAME=${TELEGRAF_HOSTNAME:?"Hostname 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:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
collector:
|
collector:
|
||||||
container_name: collector
|
container_name: collector
|
||||||
#image: gitea.kobim.cloud/kobim/peertube-collector
|
image: gitea.kobim.cloud/kobim/peertube-collector
|
||||||
build:
|
#build:
|
||||||
context: .
|
#context: .
|
||||||
dockerfile: Dockerfile
|
#dockerfile: Dockerfile
|
||||||
depends_on:
|
depends_on:
|
||||||
selenium:
|
selenium:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
telegraf:
|
telegraf:
|
||||||
condition: service_started
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- VIDEO_URL=${VIDEO_URL:?"Video URL is required"}
|
- VIDEO_URL=${VIDEO_URL:?"Video URL is required"}
|
||||||
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "9092:9092"
|
- "9092:9092"
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
|
@@ -25,6 +25,9 @@
|
|||||||
player = "player"
|
player = "player"
|
||||||
peers = "peers"
|
peers = "peers"
|
||||||
|
|
||||||
|
[[outputs.health]]
|
||||||
|
service_address = "http://:8080"
|
||||||
|
|
||||||
[[outputs.file]]
|
[[outputs.file]]
|
||||||
files = ["stdout"]
|
files = ["stdout"]
|
||||||
data_format = "json"
|
data_format = "json"
|
||||||
|
Reference in New Issue
Block a user