services:
  postgres:
    extends:
      file: docker-compose.yml
      service: postgres

  api:
    extends:
      file: docker-compose.yml
      service: api

  integration-tests:
    build:
      context: .
      dockerfile: SatelliteProvider.IntegrationTests/Dockerfile
    container_name: satellite-provider-integration-tests
    environment:
      - API_URL=http://api:8080
      - INTEGRATION_TESTS_MODE=${INTEGRATION_TESTS_MODE:-full}
      - DB_CONNECTION_STRING=Host=postgres;Port=5432;Database=satelliteprovider;Username=postgres;Password=postgres
      - JWT_SECRET=${JWT_SECRET}
    volumes:
      - ./ready:/app/ready
      - ./tiles:/app/tiles
    depends_on:
      api:
        condition: service_started
      postgres:
        condition: service_healthy
    restart: "no"

volumes:
  postgres_data:

