mirror of
https://github.com/complexcaresolutions/documentation.git
synced 2026-03-17 16:23:53 +00:00
2.4 KiB
2.4 KiB
Staging Deployment
Staging URL: https://pl.porwoll.tech Server: sv-payload (37.24.237.181) Branch:
develop
Siehe auch: DEPLOYMENT_STRATEGY.md für die vollständige Deployment-Strategie
Trigger
| Trigger | Beschreibung |
|---|---|
Push auf develop |
Automatisches Deployment |
| workflow_dispatch | Manuelles Deployment via GitHub UI |
Workflow-Ablauf
1. Pre-deployment Checks (~1 Min)
- ESLint prüfen
- Unit Tests ausführen
- Bei Fehler: Deployment wird abgebrochen
2. Deploy to Staging (~2-3 Min)
- SSH-Verbindung zum Server
git fetch origin develop && git reset --hard origin/developpnpm install --frozen-lockfilepnpm payload migratepnpm build(mit Memory-Limit 2GB)pm2 restart payload queue-worker- Health Check auf
http://localhost:3000/admin
Manuelles Deployment
Via GitHub UI
- Gehe zu: https://github.com/c2s-admin/cms.c2sgmbh/actions
- Wähle "Deploy to Staging"
- Klicke "Run workflow"
- Optional: "Skip tests" aktivieren
Via CLI (auf dem Server)
./scripts/deploy-staging.sh
./scripts/deploy-staging.sh --skip-build
./scripts/deploy-staging.sh --skip-migrations
DEPLOY_BRANCH=feature/xyz ./scripts/deploy-staging.sh
Via SSH (Remote)
ssh payload@37.24.237.181 'cd ~/payload-cms && ./scripts/deploy-staging.sh'
Konfiguration
GitHub Secrets
| Secret | Beschreibung |
|---|---|
STAGING_SSH_KEY |
SSH Private Key für payload@37.24.237.181 |
Environment
| Variable | Wert |
|---|---|
STAGING_HOST |
37.24.237.181 |
STAGING_USER |
payload |
STAGING_PATH |
/home/payload/payload-cms |
Troubleshooting
Build schlägt fehl (OOM)
pm2 stop all
NODE_OPTIONS="--max-old-space-size=1536" pnpm build
pm2 start ecosystem.config.cjs
SSH-Verbindung fehlgeschlagen
STAGING_SSH_KEYSecret prüfen- Public Key in
~/.ssh/authorized_keysprüfen - Server erreichbar:
ping 37.24.237.181
Service startet nicht
pm2 status
pm2 logs payload --err --lines 100
pm2 start ecosystem.config.cjs
Branching-Strategie
| Branch | Deployment | URL |
|---|---|---|
main |
Produktion (manuell) | cms.c2sgmbh.de |
develop |
Staging (automatisch) | pl.porwoll.tech |
Letzte Aktualisierung: 29.12.2025