services:
  postgres:
    image: postgres:13
    container_name: postgres
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: persistant-data
      POSTGRES_PASSWORD: persistant-data-pw
      POSTGRES_DB: var
    volumes:
      - postgres-data:/var/lib/postgresql/data

  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    ports:
      - "9090:9090"
    volumes:
      - "./packages/prometheus/prometheus.dev.yml:/etc/prometheus/prometheus.yml"
    command:
      - "--config.file=/etc/prometheus/prometheus.yml"

  redis:
    container_name: redis
    image: redis/redis-stack:latest
    ports:
      - "6379:6379"
    volumes:
      - "redis_data:/data"

  livekit-server:
    image: livekit/livekit-server
    container_name: livekit_server
    restart: unless-stopped
    ports:
      - "7880:7880"
      - "7881:7881"
      - "7882:7882/udp"
      - "6789:6789" # metrics port
    volumes:
      - ./packages/livekit/livekit.yaml:/etc/livekit.yaml
    command:
      - "--config"
      - "/etc/livekit.yaml"
      - "--node-ip=127.0.0.1"

volumes:
  postgres-data:
  redis_data:
    driver: local
