version: "3.9"
services:
#  python:
#      image: tsgames/solar-monitor:manifest-arm32v7
#      build: 
#        context: .
#      restart: unless-stopped
#      devices:
#        - "/dev/vchiq"
#      volumes:
#          - images-data:/app/images
  fileserver:
      build:
        context: nginx
      restart: unless-stopped
      ports:
        - 80:80
      volumes:
        - ./src/images:/usr/share/nginx/html
  grafana:
      image: grafana/grafana:7.5.7
      ports:
        - 3000:3000
      restart: unless-stopped
      environment:
        GF_DATE_FORMATS_FULL_DATE: "DD.MM.YYYY HH:mm:ss"
      volumes:
        - grafana-data:/var/lib/grafana
  influxdb:
    #image: influxdb:1.8
    image: arm32v7/influxdb:latest
    container_name: influxdb
    restart: unless-stopped
    ports:
      - "8083:8083"
      - "8086:8086"
      - "8090:8090"
      - "2003:2003"
    environment:
      INFLUXDB_HTTP_FLUX_ENABLED: true
      DOCKER_INFLUXDB_INIT_MODE: setup
      DOCKER_INFLUXDB_INIT_USERNAME: influxdb
      DOCKER_INFLUXDB_INIT_PASSWORD: influxdbTSGAMES
      DOCKER_INFLUXDB_INIT_ORG: raspberry
      DOCKER_INFLUXDB_INIT_BUCKET: influxdb
      DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: influxdbTSGAMES
      DOCKER_INFLUXDB_INIT_RETENTION: 2y
      INFLUXD_REPORTING_DISABLED: true
      INFLUXD_STORAGE_CACHE_MAX_MEMORY_SIZE: 50000000
    volumes:
      # Data persistency
      # sudo mkdir -p /srv/docker/influxdb/data
      - influx-data:/var/lib/influxdb

volumes:
  influx-data:
  grafana-data:
  images-data: