Skip to content

chore(_example): run multiple docker executors configured from _example/.env#1617

Open
Scra3 wants to merge 3 commits into
feat/prd-214-server-step-mapperfrom
chore/multiple-instance-scripts-from-env
Open

chore(_example): run multiple docker executors configured from _example/.env#1617
Scra3 wants to merge 3 commits into
feat/prd-214-server-step-mapperfrom
chore/multiple-instance-scripts-from-env

Conversation

@Scra3
Copy link
Copy Markdown
Member

@Scra3 Scra3 commented Jun 2, 2026

What

Adds a one-command way to run the agent + the 2 docker executors (behind the nginx gateway on :3400), with all config coming from packages/_example/.env — nothing to edit in the executor example.

New scripts (in packages/_example):

  • start:with-executor:multiple-instance — agent + docker executors (reuses the pre-built image)
  • start:with-executor:multiple-instance:build — same, rebuilding the executor image

How

  • A small wrapper packages/_example/scripts/start-docker-executors.sh sources _example/.env, translates host-local URLs (localhost / 127.0.0.1 / *.development.forestadmin.com) so the containers can reach the host, waits for the agent, then delegates.
  • The executor example's executors / executors:build scripts stay config-agnostic (pure docker compose up). Run standalone from the executor example dir, they use that package's own env — not _example/.env.

Fixes to the existing compose

  • build.context ../..../../.. so the Dockerfile's COPY . . sees the repo root (was failing with lstat .../packages/packages).
  • Map *.development.forestadmin.com dev domains to the host via extra_hosts (they resolve to 127.0.0.1 on the host; inert for prod api.forestadmin.com), so containers can reach a local orchestrator.
  • Drop the separate .env.executors flow from the docs/header (config now lives only in _example/.env).

🤖 Generated with Claude Code

Note

Add multi-instance Docker executor setup with nginx gateway for the workflow executor example

  • Adds a Dockerfile for the workflow executor, building a production image that exposes port 3400 and starts via the CLI entrypoint.
  • Adds docker-compose.executors.yml that runs two executor instances behind an nginx gateway on localhost:3400, load-balancing with retry on upstream failure.
  • Adds start-docker-executors.sh to the _example package, which sources .env, rewrites localhost URLs to host.docker.internal, and waits for the agent to be reachable before starting the executor stack.
  • Adds start:with-executor:multiple-instance scripts to packages/_example/package.json to launch the agent and multi-instance executor stack together.
  • Adds a repo-level .dockerignore to exclude node_modules, env files, and build artifacts from Docker build contexts.

Macroscope summarized 47612a6.

nbouliol and others added 3 commits June 1, 2026 17:27
…le/.env

Add start:with-executor:multiple-instance[:build] (agent + the 2 docker
executors behind the nginx gateway). All config comes from packages/_example/.env
— nothing to edit in the executor example: a small wrapper script sources it,
translates host-local URLs (localhost/127.0.0.1/dev domains) so containers reach
the host, waits for the agent, then delegates.

The executor example's `executors`/`executors:build` scripts stay config-agnostic
(pure `docker compose up`), so running them standalone uses that package's own env,
not _example/.env.

Also fix the build context (../.. -> ../../.. so the Dockerfile's COPY . . sees the
repo root) and map the *.development.forestadmin.com dev domains to the host so the
containers can reach a local orchestrator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@qltysh
Copy link
Copy Markdown

qltysh Bot commented Jun 2, 2026

Qlty


Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Base automatically changed from chore/run-multiple-instances to feat/prd-214-server-step-mapper June 3, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants