---
services:
  update-composer-lock:
    platform: linux/amd64
    build:
      context: .
      dockerfile: Dockerfile
      target: composer_update
    secrets:
      - github_auth
    user: "${UID:-1000}:${GID:-1000}"
    volumes:
      - ./composer.json:/var/www/html/composer.json:ro
      - ./composer.lock:/var/www/html/composer.lock
  
  unit-lint:
    build:
      context: .
      dockerfile: Dockerfile
      target: unit-lint
      secrets:
        - github_auth
    environment:
      - MODE=unit
    volumes:
      - ./build/logs:/var/www/html/build/logs

secrets:
  github_auth:
    environment: GITHUB_AUTH
