Skip to content

chore: drop shared /run bind mount from docker-compose#613

Merged
neoneye merged 13 commits intomainfrom
chore/drop-run-volume
Apr 21, 2026
Merged

chore: drop shared /run bind mount from docker-compose#613
neoneye merged 13 commits intomainfrom
chore/drop-run-volume

Conversation

@neoneye
Copy link
Copy Markdown
Member

@neoneye neoneye commented Apr 20, 2026

Summary

Implements the Railway volume kludge TODO from docs/plan.md. Each service now writes run outputs to its own ephemeral /app/run instead of sharing a bind-mounted ./run directory. Cross-service access already goes through Postgres (PlanItem.generated_report_html, PlanItem.run_zip_snapshot) and worker_plan HTTP endpoints (/runs/{id}/zip, /runs/{id}/files), so the shared volume was redundant — and mirrored awkwardly onto Railway, where it had to be a dedicated volume.

  • Remove ./run:/app/run from worker_plan, worker_plan_database_*, frontend_multi_user in docker-compose.yml.
  • Remove PLANEXE_HOST_RUN_DIR (only purpose was mapping container paths back to the host bind mount) from compose, .env examples, worker_plan/railway.md, root/worker AGENTS.md, and worker_plan/README.md.
  • Simplify build_display_run_dir in worker_plan/app.py — response field display_run_dir is preserved per the worker API contract, it just always equals run_dir now.
  • Update docker-compose.md and docs/docker.md with the new per-container layout and how to inspect outputs (docker compose exec worker_plan ls /app/run or /runs/{id}/zip).

Test plan

  • CI lint / tests / typecheck pass
  • docker compose config validates
  • docker compose up starts the full stack cleanly with no run/ on host
  • Submit a plan end-to-end via frontend_multi_user, report renders and zip downloads work
  • Same via mcp_cloud (plan_create → plan_status → plan_file_info download URL)

🤖 Generated with Claude Code

neoneye and others added 11 commits April 20, 2026 23:18
Each service now writes to its own ephemeral /app/run. Cross-service
file access already goes through Postgres (PlanItem.generated_report_html,
PlanItem.run_zip_snapshot) and worker_plan HTTP endpoints (/runs/{id}/zip,
/runs/{id}/files), so the shared bind mount was redundant and mirrors
awkwardly onto Railway (where it had to be a dedicated volume).

- Remove `./run:/app/run` from worker_plan, worker_plan_database_*,
  frontend_multi_user.
- Remove PLANEXE_HOST_RUN_DIR env (only purpose was mapping container
  paths back to the host bind mount) from docker-compose, .env examples,
  worker_plan/railway.md, AGENTS.md notes, and worker_plan/README.md.
- Simplify build_display_run_dir in worker_plan/app.py now that there is
  no host base to map to.
- Update docker-compose.md and docs/docker.md to describe the new
  per-container run dir and how to inspect it (docker compose exec or
  /runs/{id}/zip).

To inspect run outputs during dev: `docker compose exec worker_plan ls /app/run`
or fetch via worker_plan's HTTP endpoints.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The note only made sense as a migration marker. Now that no-shared-run
is the baseline, it adds noise.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Readers were being primed to think they need to mount or configure the
run directory. It's an internal, per-container implementation detail.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
PLANEXE_RUN_DIR was a relic from when services shared a bind-mounted
/run directory. With each service now writing to its own ephemeral
filesystem, the override serves no purpose — every site just fell
back to the default anyway.

- Inline the default at each call site (worker_plan/app.py,
  worker_plan_database/app.py, mcp_cloud/db_setup.py) instead of
  os.environ.get("PLANEXE_RUN_DIR", ...).
- frontend_multi_user: drop the dotenv override path, use
  planexe_project_root / RUN_DIR directly. (app.config key name
  kept — it's an internal Flask dict key, not the env var.)
- Remove PLANEXE_RUN_DIR entry from the DotEnvKeyEnum in both
  worker_plan_api and worker_plan_internal.
- Remove ENV PLANEXE_RUN_DIR from mcp_cloud and worker_plan_database
  Dockerfiles and from docker-compose.yml (3 services).
- Update worker_plan/README.md, worker_plan/AGENTS.md,
  mcp_cloud/README.md, mcp_cloud/worker_fetchers.py docstring to
  stop referencing the env var.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The demo plan is no longer bundled with the app (demos live on the
website now). SHOW_DEMO_PLAN was hardcoded to False in both app.py and
plan_routes.py, making the entire demo branch in /viewplan unreachable.
With that gone, self.planexe_run_dir, app.config['PLANEXE_RUN_DIR'],
and the RUN_DIR constant have no remaining readers.

- Drop RUN_DIR, SHOW_DEMO_PLAN, self.planexe_run_dir, and the
  app.config['PLANEXE_RUN_DIR'] assignment from frontend_multi_user/src/app.py.
- Drop the SHOW_DEMO_PLAN flag and the demo branch from viewplan in
  plan_routes.py; drop the now-unused send_file import.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
display_run_dir is always str(run_dir) now, so the helper and the
intermediate variable were just noise. Response schema still exposes
display_run_dir per the API contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The fallback existed for setups where mcp_cloud shared a /run bind
mount with a worker. Now that each service writes to its own ephemeral
filesystem, mcp_cloud's own /run is always empty and the function
always returned None. Purge the code path end to end.

- Delete list_files_from_local_run_dir from worker_fetchers.py.
- Delete BASE_DIR_RUN constant (its only remaining use).
- Drop the call site in handlers.py and the noqa re-exports in app.py.
- Drop the mock patch from test_plan_status_tool.py.
- Update README artifact resolution order and AGENTS.md fallback docs.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@railway-app railway-app Bot temporarily deployed to PlanExe - multi user / staging April 21, 2026 15:10 Inactive
The variable is not read anywhere in the codebase; PLANEXE_POSTGRES_HOST
is the real one.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@railway-app railway-app Bot temporarily deployed to PlanExe - multi user / staging April 21, 2026 16:52 Inactive
@neoneye neoneye merged commit 3670eb7 into main Apr 21, 2026
9 checks passed
@neoneye neoneye deleted the chore/drop-run-volume branch April 21, 2026 17:09
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