version: "3.7"

services:

  app_proxy:
    environment:
      APP_HOST: influxdb_chronograf_1
      APP_PORT: 8888

  influxdb:
    image: influxdb:1.12.3@sha256:35e9976120a18fff82fefcc06d631de7585f33e7b096e9128465e6c15a9233fc
    user: 1000:1000
    restart: on-failure
    stop_grace_period: 1m
    volumes:
      - ${APP_DATA_DIR}/data/influxdb:/var/lib/influxdb
    environment:
      INFLUXDB_ADMIN_USER: admin
      INFLUXDB_ADMIN_PASSWORD: $APP_PASSWORD
      INFLUXDB_HTTP_AUTH_ENABLED: "true"

  chronograf:
    image: chronograf:1.10.8@sha256:42e7b310399e57126053f3ff8eb551290b942ebbd8fd08186af03cfce512bbff
    user: "1000:1000"
    environment:
      INFLUXDB_URL: "http://influxdb_influxdb_1:8086"
      INFLUXDB_USERNAME: admin
      INFLUXDB_PASSWORD: $APP_PASSWORD
    volumes:
      - ${APP_DATA_DIR}/data/chronograf:/var/lib/chronograf
    depends_on:
      - influxdb
