services:
  postgres:
    image: postgres:16
    environment:
      POSTGRES_DB: vigilcare_records
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: password
    ports:
      - "5437:5432"
    volumes:
      - pg_data:/var/lib/postgresql/data
    networks:
      - vigilcare

  redis:
    image: redis:7-alpine
    ports:
      - "6383:6379"
    networks:
      - vigilcare

  seq:
    image: datalust/seq:latest
    environment:
      ACCEPT_EULA: "Y"
      # Required on first run for Seq 2025+ (CreateAdminUser migration)
      SEQ_FIRSTRUN_ADMINPASSWORD: seqadmin
    ports:
      - "5346:80"
    volumes:
      - seq_data:/data
    networks:
      - vigilcare

  minio:
    image: minio/minio:latest
    command: server /data --console-address ":9001"
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin
    ports:
      - "9012:9000"
      - "9013:9001"
    volumes:
      - minio_data:/data
    networks:
      - vigilcare

  prometheus:
    image: prom/prometheus:v2.51.0
    ports:
      - "9095:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
      - prometheus_data:/prometheus
    extra_hosts:
      - "host.docker.internal:host-gateway"
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"
      - "--storage.tsdb.retention.time=30d"
    networks:
      - vigilcare

  grafana:
    image: grafana/grafana:10.4.0
    ports:
      - "3013:3000"
    environment:
      GF_SECURITY_ADMIN_USER: admin
      GF_SECURITY_ADMIN_PASSWORD: admin
      GF_USERS_ALLOW_SIGN_UP: "false"
    volumes:
      - grafana_data:/var/lib/grafana
    depends_on:
      - prometheus
    networks:
      - vigilcare

volumes:
  pg_data:
  seq_data:
  minio_data:
  prometheus_data:
  grafana_data:

networks:
  vigilcare:
    driver: bridge