services:
  app:
    container_name: h1-app
    build: .
    ports:
      - "9090:9090"
    depends_on:
      - postgres
    environment:
      CONFIG_PATH: "/app/config.yaml"
    volumes:
      - ./config.yaml:/app/config.yaml

  postgres:
    image: postgres:15
    container_name: h1-postgres
    environment:
      POSTGRES_USER: h1user
      POSTGRES_PASSWORD: h1pass
      POSTGRES_DB: h1db
    ports:
      - "5432:5432"
    volumes:
      - postgres-data:/var/lib/postgresql/data

volumes:
  postgres-data:
