8e472ac996
CI/CD - ERP Core / scripts (pull_request) Failing after 12m21s
CI/CD - ERP Core / e2e-typecheck (pull_request) Failing after 13m13s
CI/CD - ERP Core / frontend (pull_request) Failing after 14m5s
CI/CD - ERP Core / backend (pull_request) Failing after 14m57s
CI/CD - ERP Core / detect (pull_request) Failing after 13m42s
CI/CD - ERP Core / Build & Deploy (pull_request) Failing after 12m47s
CI/CD - ERP Core / ci-ok (pull_request) Failing after 14m58s
3.0 KiB
3.0 KiB
On hold — test environment + two-environment pipeline
Only erp.hexdive.com exists today, so since 2026-09-15 production is deployed Fitness-style by the
Build & Deploy job in .gitea/workflows/ci-cd.yml, the one workflow that also runs the PR checks
(docs/40-DEPLOYMENT.md, "Active"). Everything in this folder is the
test + release design built on 2026-09-14, kept intact but inactive: Gitea only runs workflows
from .gitea/workflows/, and nothing active calls these scripts.
| File | What it did |
|---|---|
deploy.two-env.yml |
The two-environment workflow: push to Dev → test, push to production → release; tree-hash change detection against the last successful deploy; nightly Playwright against test; Gitea release per production deploy |
scripts/detect.sh |
Decided which side to deploy by comparing tree hashes with /opt/erpcore/<env>/.deployed |
scripts/build-backend.sh, scripts/build-frontend.sh |
Capped container builds into versioned /opt/erpcore/releases/backend/<hash> and erp-web:<hash>, reused across environments |
scripts/deploy-backend.sh, scripts/deploy-frontend.sh |
Backup → symlink switch → health check → automatic rollback to the previous release |
scripts/release.sh |
Gitea release + release-YYYY.MM.DD-N tag with rollback hashes |
scripts/e2e.sh |
Playwright suite against test |
scripts/prune.sh |
Weekly cleanup of releases, images, backups, reports |
apache/test-erp.hexdive.com.conf |
Apache vhost for the test environment |
systemd/erpcore@.service |
Unit template for erpcore@test / erpcore@release |
The full design is documented under "On hold: two-environment design" in docs/40-DEPLOYMENT.md.
Bringing it back
- Create
test-erp.hexdive.com(DNS + certificate) and do the server bootstrap in that doc section. - Move
scripts/*.shback todeploy/scripts/(they sourcecommon.shfrom their own folder),apache/andsystemd/files back todeploy/apache/anddeploy/systemd/, anddeploy.two-env.ymlto.gitea/workflows/deploy.yml. Then delete thebuild-and-deployjob from.gitea/workflows/ci-cd.yml(or two workflows will deploy production), removeclosedfrom itspull_requesttypes and theworkflow_dispatchblock, and give it back a per-PR concurrency group (ci-${{ github.event.pull_request.number }},cancel-in-progress: true) — at that point it is the oldci.yml.deploy.two-env.ymltriggers onpush, so it cannot share one file with the PR checks the way the production-only job does. - In
deploy/scripts/common.sh, uncomment thetest)andrelease)branches ofload_envand theDev) echo testmapping. - In the checks'
frontendjob, point it back atbuild-frontend.shwithWITH_CHECKS=trueif you want PR-built images reused by the deploy. - Decide how to migrate production from
/home/erp/core/publish+erpcore.serviceto the versioned/opt/erpcore/release/backend/currentlayout +erpcore@release(or adjust the scripts to keep the production layout).