4.1 KiB
4.1 KiB
Deployment Automation Scripts
Automated deployment scripts for The Order using the Sankofa Phoenix / Proxmox runtime.
Overview
The active deployment path is now Sankofa Phoenix / Proxmox-native. The scripts in this directory now:
- build The Order locally
- package the
portal-publicNext.js standalone bundle - sync it to the Order public CT on Proxmox
- refresh the Order HAProxy edge
- verify direct, edge, and public health endpoints
The default topology is:
order-portal-publicCT10090at192.168.11.36:3000order-haproxyCT10210at192.168.11.39:80- public URL
https://the-order.sankofa.nexus - Phoenix public URL
https://phoenix.sankofa.nexus
Quick Start
# Deploy the frontend to the default dev target
./scripts/deploy/deploy.sh --phase 11 --environment dev
# Run the direct sync script
./scripts/deploy/sync-portal-public-to-sankofa-phoenix.sh
# Full phase flow
./scripts/deploy/deploy.sh --all --environment dev
Configuration
Configuration is managed in config.sh. The most important variables are:
PROXMOX_HOSTORDER_PORTAL_PUBLIC_VMIDORDER_PORTAL_PUBLIC_IPORDER_HAPROXY_VMIDORDER_HAPROXY_IPSANKOFA_PHOENIX_URLTHE_ORDER_PUBLIC_URLIMAGE_REGISTRYIMAGE_TAG
Example:
export ENVIRONMENT=prod
export PROXMOX_HOST=192.168.11.11
export ORDER_PORTAL_PUBLIC_VMID=10090
export ORDER_HAPROXY_VMID=10210
./scripts/deploy/deploy.sh --phase 11
Phase Scripts
Phase 1: Prerequisites
- verifies local tooling
- verifies SSH access to Proxmox
- records the Sankofa / Order runtime targets
./scripts/deploy/phase1-prerequisites.sh
Phase 2: Sankofa Phoenix Target Preparation
- confirms the Order public CT and HAProxy CT are reachable
- previews the HAProxy config for
the-order.sankofa.nexus - probes Phoenix public health
./scripts/deploy/phase2-sankofa-phoenix-target.sh
Phase 6: Build & Package
- builds all packages and applications
- creates local Docker images for services and apps
- previews the Phoenix deployment artifact
./scripts/deploy/phase6-build-package.sh
Phase 11: Frontend Applications Deployment
- builds
portal-public - syncs the standalone bundle to CT
10090 - installs or refreshes the
the-order-portal-publicsystemd service - reprovisions the Order HAProxy edge on
10210 - verifies LAN and public health endpoints
./scripts/deploy/phase11-frontend-apps.sh
Usage Examples
Frontend deployment
./scripts/deploy/deploy.sh --phase 11 --environment dev
Build only
./scripts/deploy/deploy.sh --phase 6 --environment dev
Continue from the last saved state
./scripts/deploy/deploy.sh --continue
State Management
Deployment state is saved in .deployment/${ENVIRONMENT}.state.
Artifacts and image manifests are written under .deployment/artifacts/.
Logging
All deployment logs are saved to logs/deployment-YYYYMMDD-HHMMSS.log.
tail -f logs/deployment-*.log
Manual Steps
Some phases still require external operator work:
Phase 3: identity-provider / Entra setupPhase 8: secret injection into the chosen backendPhase 12: DNS / NPM updates if you are changing routingPhase 13: central monitoring / alert wiring
Troubleshooting
Check deployment state
cat .deployment/dev.state
Verify Order runtime access
ssh [email protected] "pct status 10090 && pct status 10210"
curl -fsS http://192.168.11.36:3000/api/health
curl -fsS -H 'Host: the-order.sankofa.nexus' http://192.168.11.39/api/health
curl -fsS https://the-order.sankofa.nexus/api/health
Verify Phoenix public access
curl -fsS https://phoenix.sankofa.nexus/health
View CT service logs
ssh [email protected] "pct exec 10090 -- journalctl -u the-order-portal-public -n 100 --no-pager"
Security Notes
- never commit secrets to the repository
- keep Proxmox SSH access limited to operator hosts
- review CT and HAProxy targets before applying changes
- prefer the documented
10090 -> 10210 -> publicpath over ad hoc edits