---
services:

  function:
    platform: linux/amd64
    build:
      context: .
      target: deploy
      args:
        version: "local-dev"
    volumes:
      - ./src:/var/task/src
    ports:
      - "9000:8080"
    environment:
      - DD_ENV=dev
      - DD_SERVICE=get-asset-locations
      - DD_TRACE_ENABLED=false
      - DD_ENHANCED_METRICS=false
      - DD_LOCAL_TEST=true
  update_poetry_lockfile:
    platform: linux/amd64
    build:
      context: .
      target: poetry-update
    volumes:
        - ./poetry.lock:/var/task/poetry.lock
  unit-lint:
    platform: linux/amd64
    build:
      context: .
      target: unit-lint
    volumes:
      - ./src:/var/task/src
      - ./tests:/var/task/tests
      - ./build:/var/task/build
    environment:
      - SKIP_LINT=0
      - SKIP_TYPE_CHECKS=0
      - SKIP_TESTS=0
      - TEST_ARGS=
      - AWS_REGION=us-east-1
  integration-test:
    platform: linux/amd64
    build:
      context: .
      target: integration-test
    environment:
      - Environment=qa
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_SESSION_TOKEN
