Skip to content

feat(infra): add partha:up instant restart and partha:down (#223 follow-up) - #224

Merged
parthrohit22 merged 1 commit into
Second-Origin:devfrom
parthrohit22:feat/222-launcher-no-build
Jul 27, 2026
Merged

feat(infra): add partha:up instant restart and partha:down (#223 follow-up)#224
parthrohit22 merged 1 commit into
Second-Origin:devfrom
parthrohit22:feat/222-launcher-no-build

Conversation

@parthrohit22

Copy link
Copy Markdown
Collaborator

Summary

Make the npm run partha one-command launcher convenient for both first-time users
and repeated local restarts. The default npm run partha keeps building images from
source (so any fresh clone works with no pre-built image — the "all users" property).
Add npm run partha:up for instant restarts that skip the build step and reuse the
already-built images, and npm run partha:down to stop the stack from another terminal.

This is dev-tooling/onboarding only. It introduces no new product surface, changes no
API contract, and preserves the existing security posture (Postgres/Redis host-isolated,
named volumes persist).

Linked issue

Part of #223 (full-stack compose launcher). Convenience follow-up requested during
verification of the re-run build behavior.

What changed

  • Backend/infra (scripts/partha.mjs): accept a --no-build flag; when set, run
    docker compose up --wait instead of docker compose up --build --wait. All other
    behavior (Docker/buildx preflight, readiness waits, Ctrl+C → compose down) unchanged.
  • Root package.json: add partha:up (node scripts/partha.mjs --no-build) and
    partha:down (docker compose down).
  • README.md: document partha:up / partha:down and clarify that images are
    reused from cache on repeat runs.

Acceptance criteria completed

  • npm run partha (with --build) still boots all four services and prints
    PARTHA is ready at http://localhost:5173; curl localhost:8000/ready → 200 and
    curl localhost:5173/ → 200.
  • npm run partha:up starts the existing images with zero rebuild (Building lines
    = 0) and reaches ready; API + frontend return 200.
  • npm run partha:down stops the stack cleanly.
  • No change to OpenAPI contract, security boundaries, or volume persistence.
  • docker compose -f docker-compose.yml config remains valid.

Testing performed

On macOS with Docker (colima) running:

  • npm run partha: booted all 4 services, ready line printed, /ready 200, frontend 200.
  • npm run partha:up: booted with 0 Building lines (image cache reused), ready line,
    /ready 200, frontend 200.
  • npm run partha:down: containers stopped, no orphans; named volumes preserved.

Screenshots

Not applicable (infra/launcher script change; verified via curl + compose status).

Security and data considerations

None new. Postgres/Redis remain host-isolated (no host port bindings). No secrets added
to code or Compose. Named volumes (partha_postgres_data, partha_partha_storage)
preserve data across restarts as before.

Dependencies and blocked work

None. Depends on #223 (merged) for the base launcher.

Scope changes or remaining work

None. This is a convenience enhancement only.

Contributor checklist

  • Branch named per CONTRIBUTING convention (feat/222-launcher-no-build)
  • PR template fully filled
  • Roadmap alignment stated (W7 deployment repeatability / §28)
  • No new product surface; dev-tooling only
  • Verification evidence included (real boot + curl)
  • No secrets committed

…igin#223 follow-up)

Keep npm run partha self-building for fresh clones (no pre-built image needed),
add partha:up (--no-build) for cached instant restarts and partha:down to
stop from another terminal. Documents both in README.
@parthrohit22
parthrohit22 merged commit 3aa8a94 into Second-Origin:dev Jul 27, 2026
8 checks passed
@parthrohit22
parthrohit22 deleted the feat/222-launcher-no-build branch July 27, 2026 16:12
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