services: influxdb: ports: - target: 8086 published: 8087 protocol: tcp mode: ingress volumes: - data:/var/lib/influxdb2 - config:/etc/influxdb2 secrets: - influxdb2-admin-token environment: DOCKER_INFLUXDB_INIT_MODE: setup DOCKER_INFLUXDB_INIT_USERNAME: ha DOCKER_INFLUXDB_INIT_PASSWORD: haHAhaHA DOCKER_INFLUXDB_INIT_ORG: ha DOCKER_INFLUXDB_INIT_BUCKET: ha DOCKER_INFLUXDB_INIT_ADMIN_TOKEN_FILE: /run/secrets/influxdb2-admin-token image: ${DOCKER_REGISTRY:-}influxdb:2 healthcheck: test: echo test > /var/lib/influxdb2/hc || exit 1 interval: 10s timeout: 3s retries: 2 deploy: labels: com.centurylinklabs.watchtower.enable: 'true' wud.watch: 'true' wud.watch.digest: 'true' replicas: 1 placement: constraints: - node.role == manager secrets: influxdb2-admin-token: external: true