name: imgforger
services:
  imgforge:
    build: .
    ports:
      - "3000:3000"
      - "9000:9000"
    environment:
      IMGFORGE_KEY: "df98d2b45c031b318b5eb21e647e51941cc4b8e42f49f0dbbfef39df7eebe8a6e006723230d9dd0f7f5d10268b4c695beca0518efd258d90db5dd6466bef8e77"
      IMGFORGE_SALT: "94c7a552856d6da4751948d6d1aaf66a583f70f668919fef41dbf88dd0d806b8dc426094ad49859c608ffaeb8e62aa77398b4cd967103348d8fe78841b4dd394"
      IMGFORGE_LOG_LEVEL: "info"
      IMGFORGE_PROMETHEUS_BIND: "9000"
      IMGFORGE_CACHE_TYPE: "memory"
      IMGFORGE_CACHE_MEMORY_CAPACITY: "1000"
    networks:
      - monitoring

  prometheus:
    image: prom/prometheus:latest
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - prometheus-data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.console.libraries=/usr/share/prometheus/console_libraries'
      - '--web.console.templates=/usr/share/prometheus/consoles'
    networks:
      - monitoring

  grafana:
    image: grafana/grafana:latest
    ports:
      - "3001:3000"
    environment:
      - GF_SECURITY_ADMIN_USER=admin
      - GF_SECURITY_ADMIN_PASSWORD=admin
      - GF_USERS_ALLOW_SIGN_UP=false
    volumes:
      - grafana-data:/var/lib/grafana
      - ./grafana-dashboards:/etc/grafana/provisioning/dashboards
      - ./grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
    networks:
      - monitoring
    depends_on:
      - prometheus

networks:
  monitoring:
    driver: bridge

volumes:
  prometheus-data:
  grafana-data:
