Gitea Actions Runner Test / test-job (push) Successful in 1s
CI / check (push) Successful in 30s
CI / tests-integration (push) Successful in 1m47s
CI / tests-unit (push) Successful in 1m54s
CI / tests-ui (push) Successful in 2m40s
CI / preflight (push) Skipped
CI / deploy (push) Failing after 1m41s
The port-conflict guard added in the previous commit made the six existing blue/green deployment simulation tests fail. assert_port_free() shells out to ss, and the simulation harness stubs git, curl, docker, nginx, pnpm and node — but not ss. Because the runner is self-hosted and the containers use --net=host, the simulation saw the production CMS containers holding 3002 and 3003 and refused to start its own candidate. The harness now stubs ss. It reports no listener for every scenario except 'port-taken', which reserves whichever port the script asks about, so the simulation stays independent of the host it runs on. Also switched the ss probe from `command -v ss` to `type ss`. The stub is a shell function delivered through BASH_ENV; `command -v` happens to find it, but `type` is the reliable test for "is this resolvable", and the two differ across shells. Added a regression test for the guard itself: with the candidate port already occupied, the deploy must fail, must not have run `docker run`, and must leave the nginx upstream untouched on the old port — no half-finished cutover. Verified it fails when the assert_port_free call is removed. Deploy simulation: 26 passed. Full unit suite: 3316 passed, 12 skipped.
Scripts Documentation
This directory contains utility scripts for managing the EpicNext-Cms project.
Scripts Overview
| Script | Description |
|---|---|
dashboard.sh |
Main interactive menu to run all other scripts. |
deploy.sh |
Safely redeploys the application by freeing the port first. |
logs.sh |
View logs for cms and mariadb services. |
backup.sh |
Creates a database backup in /backups. |
db-restore.sh |
Restores a database backup. |
db-optimize.sh |
Optimizes database tables. |
docker-prune.sh |
Cleans up unused Docker resources. |
verify-deploy.sh |
Checks if the CMS is reachable after deployment. |
check-env.sh |
Validates .env against .env.example. |
check-security.sh |
Runs pnpm audit and checks for image updates. |
monitor.sh |
Shows system disk/container resource usage. |
perf-report.sh |
Runs performance profiling. |
setup-dev.sh |
Configures development environment. |
check-updates.sh |
Checks for package and image updates. |
maintenance.sh |
Toggles maintenance mode flag. |
doctor.sh |
Runs a system diagnostic report. |
setup-cron.sh |
Configures automated cron jobs. |
alert.sh |
Sends notifications to a configured webhook. |
Usage
Run any script directly, or use the dashboard:
./scripts/dashboard.sh