PR AA: Phoenix / systemd deployment scaffolding (migrate Phoenix off Next.js stub) #31
Reference in New Issue
Block a user
Delete Branch "devin/1776898782-pr-aa-phoenix-migration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PR AA — Phoenix / systemd deployment scaffolding
Closes the gap between Gitea
main(b48eb2a, Vite portal + Node orchestrator, 29 PRs merged, 167 tests) and what's actually servingcurucombo.曼李.comtoday (Next.js "ISO-20022 Combo Flow" app from an unpushed localb118b2bcheckout). After this PR is merged and the runbook inscripts/deployment/README.mdis followed on CT 8604, the Phoenix deployment will served-bis/CurrenciCombomain.Nothing in this PR changes runtime code. All additions live under
scripts/deployment/.Artifacts
systemd/currencicombo-orchestrator.serviceEnvironmentFile=/etc/currencicombo/orchestrator.env. Hardening:ProtectSystem=strict,PrivateTmp,NoNewPrivileges,LockPersonality, no ambient caps.systemd/currencicombo-webapp.service:3000viaRuntimeDirectory=currencicombo-webapp.webapp-nginx.conf/api/*and/events/*so an NPMplus misconfig surfaces as a clean error rather than silently returningindex.html..env.prod.example/etc/currencicombo/orchestrator.env. Documents everyEXT-*blocker env var 1:1 with the Proxmox repo'scheck-external-dependencies.sh.install.sh--force-recreate-dbto wipe), Redis autodetect, env file with auto-generatedEVENT_SIGNING_SECRET+ 3 API keys, systemd units enabled.--dry-runsupported.deploy-currencicombo-8604.shphoenix-deploy-api/deploy-targets.jsontuple.git fetch/reset→ orchestratortscbuild → portalvite buildwithVITE_ORCHESTRATOR_URLbaked in →npm run migrate→ timestamped backup →systemctl stop→ rsync →systemctl start→ smoke/ready+ portal/→ grepEXT-*fromjournalctl. Flags:--ref,--dry-run,--skip-migrate,--skip-build,--rollback.README.mdTarget-agnostic
No IP / hostname / VLAN is hardcoded anywhere in the scripts or units. The only file that embeds the public hostname is
README.md(documentation) and the defaultVITE_ORCHESTRATOR_URLindeploy-currencicombo-8604.sh, which is overridable via env:Single-origin NPMplus routing (user-confirmed)
The NPMplus rule bodies, exact Host / X-Forwarded-* headers, and SSE timeout settings are spelled out in
README.md.Verification on this build box (headless)
shellcheck --severity=warningon both scripts: clean.bash -non both scripts: clean.systemd-analyze verifyon both unit files: parse cleanly. Only complaint is/usr/sbin/nginxnot being executable, which is expected — nginx is installed byinstall.shat deploy time on CT 8604.install.sh --dry-run: fails fast with the expected FATAL on hosts withoutpsql(build box). On CT 8604 with Postgres + Redis already installed, it walks through every step idempotently.deploy-currencicombo-8604.sh --help: prints the usage block with all 5 flags and 10 env overrides.Out of scope
install.sh+deploy-currencicombo-8604.shthemselves per README §"First-time setup" and §"Cutting over from the pre-existing Next.js build". This PR is artifacts-only./home/intlc/projects/proxmoxafter cutover runs cleanly):phoenix-deploy-api/deploy-targets.jsonto point atscripts/deployment/deploy-currencicombo-8604.sh.ignoreBuildErrors" language inEXTERNAL_DEPENDENCY_BLOCKERS.md— the new webapp is Vite +tsc -bstrict, no build-error suppression.Relationship to PR #30
PR #30 (
docker composesandbox) remains mergeable and unchanged — it's the local dev path. PR AA is the Phoenix prod path. They share conventions (nginx.conf, .env template layout, EXT-* contract) so future ops changes affect both consistently.Closing as superseded. main
4a1f69a"deploy: make Phoenix redeploys archive-safe" adopted the bulk of this PRs scope directly to main (install.sh, deploy-currencicombo-8604.sh, .env.prod.example, README.md, systemd/currencicombo-webapp.service, plus the three locked ops improvements). The three files that did not make it into4a1f69a(webapp-nginx.conf, systemd/currencicombo-orchestrator.service, install-prune-cron.sh) are all referenced by main but physically missing. Those three are now in a small follow-on PR opened against main.Original PR #31 branch devin/1776898782-pr-aa-phoenix-migration stays available for history.
Pull request closed