services:

  unit-lint:
    build:
      context: .
      target: unit-lint
    volumes:
      - .:/var/app

  integration-test:
    build:
      context: .
      target: integration-test
    depends_on:
      monday-com-orca-backend-deploy:
        condition: service_healthy
    environment:
      - SNOWFLAKE_PRIVATE_KEY
      - MONDAY_APP_CLIENT_SECRET
      - QA_BASE_URL=http://monday-com-orca-backend-deploy:8080
    volumes:
      - .:/var/app

  monday-com-orca-backend-dev:
    build:
      context: .
      target: dev
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:5000/hello"]
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    environment:
      - Environment=dev
      - DD_ENV=dev
      - DD_SERVICE=ows-monday-com-orca-backend
      - DD_AGENT_HOST=dev-datadog-agent.dev.theorchard.io
      - DD_TRACE_ENABLED=1
      - DD_PROFILING_ENABLED=1
    volumes:
      - .:/var/app

  monday-com-orca-backend-deploy:
    build:
      context: .
      target: deploy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/hello"]
      interval: 1m30s
      timeout: 10s
      retries: 3
      start_period: 40s
    environment:
      - SNOWFLAKE_PRIVATE_KEY
      - MONDAY_APP_CLIENT_SECRET
      - Environment=dev
      - DD_ENV=dev
      - DD_SERVICE=ows-monday-com-orca-backend
      - DD_AGENT_HOST=dev-datadog-agent.dev.theorchard.io
      - DD_TRACE_ENABLED=1
      - DD_PROFILING_ENABLED=1
