---
services:
  function:
    platform: linux/amd64
    build:
      context: .
      target: deploy
      args:
        version: "local-dev"
    volumes:
      - ./fargate_redeploy:/var/task/fargate_redeploy
    ports:
      - "9000:8080"
    environment:
      - DD_ENV=dev
      - DD_SERVICE=fargate-redeploy
      - DD_TRACE_ENABLED=false
      - DD_ENHANCED_METRICS=false
      - PYTHONDONTWRITEBYTECODE=1
      - AWS_LAMBDA_FUNCTION_TIMEOUT=900
      - AWS_ACCESS_KEY_ID
      - AWS_SECRET_ACCESS_KEY
      - AWS_SESSION_TOKEN
      - LOGGER_LEVEL=INFO
  lint-and-test:
    build:
      context: .
      target: lint-and-test
    volumes:
      - ./build:/var/app/build
