version: '3.3' services: grafana: image: grafana/grafana:7.1.1 container_name: grafana expose: - "3000" volumes: - "./grafana:/var/lib/grafana" restart: always user: "0" networks: - public labels: - "traefik.enable=true" - "traefik.http.services.grafana.loadbalancer.server.port=3000" - "traefik.http.routers.grafana.rule=Host(`mon.example.com`)" - "traefik.http.routers.grafana.tls=true" - "traefik.http.routers.grafana.tls.certResolver=le" env_file: ./env.grafana influxdb: image: influxdb:1.7 container_name: influxdb restart: always expose: - "8086" networks: - public - default volumes: - "./influxdb:/var/lib/influxdb" labels: - "traefik.enable=true" - "traefik.http.services.influxdb.loadbalancer.server.port=8086" - "traefik.http.routers.influxdb.rule=Host(`influx.example.com`)" - "traefik.http.routers.influxdb.tls=true" - "traefik.http.routers.influxdb.tls.certResolver=le" env_file: ./env.influxdb networks: public: external: true