44 lines
1.6 KiB
YAML
44 lines
1.6 KiB
YAML
services:
|
|
influxdb:
|
|
profiles: ["monitoring","all","influxdb", "prometheus"]
|
|
image: influxdb:2.7
|
|
container_name: influxdb
|
|
restart: unless-stopped
|
|
# env_file:
|
|
# - ${PROJECT_ROOT}/secrets/stack-secrets.env
|
|
volumes:
|
|
- ${PROJECT_ROOT}/monitoring/influxdb:/var/lib/influxdb2
|
|
environment:
|
|
DOCKER_INFLUXDB_INIT_MODE: ${INFLUXDB_INIT_MODE}
|
|
DOCKER_INFLUXDB_INIT_USERNAME: ${INFLUXDB_INIT_USERNAME}
|
|
DOCKER_INFLUXDB_INIT_PASSWORD_FILE: /run/secrets/influxdb_init_password
|
|
DOCKER_INFLUXDB_INIT_ORG: ${INFLUXDB_INIT_ORG}
|
|
DOCKER_INFLUXDB_INIT_BUCKET: ${INFLUXDB_INIT_BUCKET}
|
|
secrets:
|
|
- influxdb_init_password
|
|
networks:
|
|
# - edge
|
|
# - traefik_reverse_proxy
|
|
- traefik
|
|
- monitor
|
|
labels:
|
|
- "traefik.http.routers.influxdb.rule=Host(`influxdb.lan.ddnsgeek.com`)"
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.influxdb.entrypoints=websecure"
|
|
- "traefik.http.routers.influxdb.tls.certresolver=myresolver"
|
|
- "traefik.http.routers.influxdb.tls.options=mtls-private-admin@file"
|
|
- "io.portainer.accesscontrol.public"
|
|
- "traefik.http.services.influxdb.loadbalancer.server.port=8086"
|
|
- "traefik.http.routers.influxdb.middlewares=authelia"
|
|
- "traefik.docker.network=core_traefik"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -f http://localhost:8086/health || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
secrets:
|
|
influxdb_init_password:
|
|
file: ${PROJECT_ROOT}/secrets/influxdb_init_password.txt
|