services:
  timescaledb:
    image: timescale/timescaledb:latest-pg16
    restart: unless-stopped
    environment:
      POSTGRES_USER: mmo
      POSTGRES_PASSWORD: mmo
      POSTGRES_DB: mmo
    ports:
      - "5432:5432"
    volumes:
      - timescaledb_data:/var/lib/postgresql/data

  grafana:
    image: grafana/grafana:latest
    restart: unless-stopped
    environment:
      GF_SECURITY_ADMIN_USER: admin
      GF_SECURITY_ADMIN_PASSWORD: admin
    ports:
      - "3000:3000"
    volumes:
      - grafana_data:/var/lib/grafana
    depends_on:
      - timescaledb

  zone-server:
    build: .
    ports:
      - "8101:8101/udp"
      - "8102:8102/udp"
    depends_on:
      - timescaledb

volumes:
  timescaledb_data:
  grafana_data:
