services:
  cli:
    platform: linux/amd64
    build:
      context: .
      target: deploy
    env_file:
      - path: .env
        required: false
    environment:
      - BASE_PATH=/workspace
    volumes:
      - ${BASE_PATH:-.}:/workspace:ro
  
  lint-and-test:
    platform: linux/amd64
    build:
      context: .
      target: lint-and-test

  format:
    platform: linux/amd64
    build:
      context: .
      target: lint-and-test
    user: root
    volumes:
      - ./src:/var/app/src
      - ./tests:/var/app/tests
    entrypoint: ["bash", "-c", "ruff format && black . && ruff check . --fix"]
