# ─────────────────────────────────────────────────
# Build-from-source override
# ─────────────────────────────────────────────────
# Use this to build images locally instead of pulling pre-built ones:
#
#   docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build
#
# The build: directives here override the image: directives in
# docker-compose.yml, telling Compose to build from source and tag
# the result with the ghcr.io image name.
#
# API and Engine use repo root as build context so the shared/
# workspace package is accessible during the build.
# ─────────────────────────────────────────────────

services:
  engine:
    build:
      context: .
      dockerfile: engine/Dockerfile
      args:
        GITHUB_TOKEN: ${GITHUB_TOKEN:-}

  api:
    build:
      context: .
      dockerfile: backend/Dockerfile

  frontend:
    build:
      context: ./frontend
      dockerfile: Dockerfile
      args:
        VITE_EDITION: community
