Skip to content

build(dev): run local Temporal on the CLI dev server image - #910

Closed
aixle-com[bot] wants to merge 1 commit into
developfrom
chore/362-cve-temporal-dev-server
Closed

aixle-com[bot] wants to merge 1 commit into
developfrom
chore/362-cve-temporal-dev-server

Conversation

@aixle-com

@aixle-com aixle-com Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

What and why

temporalio/auto-setup was discontinued after 1.29.7, so no newer tag fixes its 64 critical/high CVEs (3 critical, including KEV CVE-2026-111497). The image only backs the local dev stack. Following the Tech Design, the compose temporal service now runs the Temporal CLI dev server instead.

  • docker-compose.yml: temporal uses temporalio/temporal:1.10.1 (latest CLI release, 2026-11-13) with server start-dev --ip 0.0.0.0 --port 7233 --headless --namespace default --db-filename … --log-level error. The Postgres env vars and depends_on: db are removed. The healthcheck uses exec form against 127.0.0.1:7233. The service name, port 7233 (TEMPORAL_HOST_PORT), the default namespace and the healthcheck contract stay the same, so worker, temporal-ui and config/settings.yml need no changes.
  • A new named volume, temporal_data, keeps the SQLite store between restarts.
  • docs/quickstart.md and its portal copy quick-start.md now say that Temporal is pulled, not built.
  • CHANGELOG.md has an Unreleased/Changed entry: local Temporal state resets once, and the old temporal / temporal_visibility Postgres DBs can be dropped.

Deviation from the Tech Design (its "volume ownership" risk, resolved by its own fallback): the image's config says USER temporal (uid 1000) and has no /data directory. A new named volume at /data would be owned by root, and SQLite could not write to it. The volume is mounted at /home/temporal instead, a path the image owns, and Docker gives a new volume the owner of that path. The DB file is /home/temporal/temporal.db.

Card: https://flow.aixle.com/company/projects/56/board?n=362

Checks

  • Ran: docker-compose.yml parses as YAML; the temporal service, the temporal_data volume and worker.depends_on.temporal: service_healthy resolve as expected.
  • Ran: read the image config from the registry for temporalio/temporal:1.10.1: entrypoint temporal, user temporal (uid 1000), alpine 3.24.4 base, amd64 and arm64 builds.
  • Did not run: this container has no Docker, so none of the following ran: make up, the temporal healthcheck, the worker boot and schedule sync, the make worker boot smoke, persistence across docker compose restart temporal, make lint_check_all and the Rails/Vitest suites. Tests and CI do not use the compose temporal service; they boot their own dev server from bin/seed-temporal-test-server. The Tech Design adds no automated tests.
  • The CVE scanner re-run on the new image is left to the agent code review.

🤖 Generated with Claude Code

temporalio/auto-setup was discontinued after 1.29.7 and carries 64
critical/high CVEs (one in CISA KEV). Replace the compose temporal
service with temporalio/temporal 1.10.1 `server start-dev`, persisted
to SQLite on the temporal_data volume. Service name, port 7233, the
default namespace and the healthcheck contract stay, so worker,
temporal-ui and config/settings.yml are unchanged.

Refs #362

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Aixle Flow <[email protected]>
@aixle-com

aixle-com Bot commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

Code Review — round 1 — PASS

Card mode: regular. The card has both cve-bug and compat:breaking, so it got a full code review against the Tech Design.
Scope: PR #910 (chore/362-cve-temporal-dev-server, commit d71825f0). Files: docker-compose.yml, CHANGELOG.md, docs/quickstart.md, app/frontend/pages/Docs/data/pages/quick-start.md.

Critical issues

None.

What was checked

  • The change follows the Tech Design. The temporal service now uses temporalio/temporal:1.10.1, an exact tag, and runs server start-dev --ip 0.0.0.0 --port 7233 --headless --namespace default --db-filename … --log-level error. The changes the Tech Design lists are all there:
    • the Postgres env vars and depends_on: db are gone;
    • the healthcheck is exec-form against 127.0.0.1:7233;
    • the temporal_data volume is added at the top level;
    • the service name, port mapping (BIND_ADDRESS / TEMPORAL_HOST_PORT), temporal-ui, worker and config/settings.yml are unchanged.
  • The new image actually works with this config. I read the image config from the registry for linux/amd64:
    • ENTRYPOINT ["temporal"], so command: server start-dev … runs correctly;
    • USER temporal (uid 1000) and adduser -u 1000 -D temporal, so /home/temporal exists and the temporal user owns it. A fresh named volume mounted there takes that owner, so the SQLite file is writable. This is the Tech Design's volume-ownership fallback, and the PR explains it;
    • temporal is on PATH (/usr/local/bin), so the exec-form healthcheck has no shell dependency.
  • The old version is gone everywhere it mattered. auto-setup, 1.29.7, POSTGRES_SEEDS and temporal_visibility no longer appear anywhere except dated research docs and the changelog line. Nothing else in the Makefile, bin/, CI or .env.example depended on the Postgres-backed Temporal.
  • Docs. Both copies of the quickstart mirror pair were updated together, as CLAUDE.md requires.
  • Changelog. The entry is under [Unreleased] / Changed with no product area. That fits CLAUDE.md, because a dev-environment change is repository-level, and changelog_test only checks bold area prefixes.
  • Commit. The message is build(dev): … (Conventional Commits) and has a Signed-off-by line.
  • Tests. None are expected. The Tech Design notes that tests and CI boot their own dev server and do not use this compose service.
  • Image scan (the Tech Design asks for it). I ran trivy image --severity CRITICAL,HIGH temporalio/temporal:1.10.1 with trivy v0.72.0 (binary sha256 verified). Targets: alpine 3.24.4 and usr/local/bin/temporal (gobinary). Result: 0 critical/high findings. All 64 critical/high CVEs of the card (including the KEV CVE-2026-111497 in brotli-libs) were in auto-setup layers and binaries (tctl, dockerize, OS packages), and the new image does not contain them.

Non-critical suggestions

  1. docker-compose.yml:85: --namespace default is redundant, because the dev server always creates default. The Tech Design asks for it and it is harmless, so you can keep it or drop it.
  2. CHANGELOG.md:21: the entry is four sentences, and CLAUDE.md asks for "one or two lines". You could cut it to the operator-relevant parts: the new image and volume, the one-time loss of local history, and that the old DBs can be dropped.
  3. Docker was not available in the implementation container, so the runtime behaviour has not been run yet: healthcheck, worker connection over 0.0.0.0, and persistence across docker compose restart temporal. The test plan on the card covers all three. Run it before merging.

@evgeny-agafonov

Copy link
Copy Markdown
Contributor

Superseded by #954: the same change rebased on develop, opened from a fork.

@aixle-com

aixle-com Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #954.

@aixle-com aixle-com Bot closed this Dec 1, 2026
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.

1 participant