Aktualisiere Umgebungsvariablen-Konfiguration für das Produktions-Deployment
Some checks failed
Deploy production / deploy (push) Failing after 2s

This commit is contained in:
Torsten Schulz (local)
2026-08-26 15:42:00 +02:00
parent 9269896b42
commit b2431f1e16
2 changed files with 12 additions and 11 deletions

View File

@@ -4,15 +4,16 @@ Der Workflow `workflows/deploy-production.yml` startet bei jedem Push auf
`main` das Script `deploy-production.sh` im Produktions-Checkout `main` das Script `deploy-production.sh` im Produktions-Checkout
`/var/www/timeclock`. `/var/www/timeclock`.
Einmalig im Gitea-Repository unter **Settings → Actions → Secrets** anlegen: Einmalig im Gitea-Repository konfigurieren:
- `TIMECLOCK_DEPLOY_HOST`: Hostname des Produktionsservers, z. B. - Unter **Settings → Actions → Variables**:
`stechuhr3.tsschulz.de` - `TIMECLOCK_DEPLOY_HOST`: Hostname des Produktionsservers
- `TIMECLOCK_DEPLOY_USER`: Linux-Benutzer mit Zugriff auf den Checkout und PM2 - `TIMECLOCK_DEPLOY_USER`: Linux-Benutzer mit Zugriff auf den Checkout und PM2
- `TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY`: privater SSH-Schlüssel dieses Deploy- - `TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS`: Ausgabe von
Benutzers `ssh-keyscan -H <TIMECLOCK_DEPLOY_HOST>`
- `TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS`: Ausgabe von - Unter **Settings → Actions → Secrets**:
`ssh-keyscan -H stechuhr3.tsschulz.de` - `TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY`: privater SSH-Schlüssel dieses
Deploy-Benutzers
Der öffentliche Teil des Deploy-Schlüssels muss auf dem Produktionsserver in Der öffentliche Teil des Deploy-Schlüssels muss auf dem Produktionsserver in
`~/.ssh/authorized_keys` des Deploy-Benutzers hinterlegt sein. Der Gitea `~/.ssh/authorized_keys` des Deploy-Benutzers hinterlegt sein. Der Gitea

View File

@@ -11,10 +11,10 @@ jobs:
steps: steps:
- name: Deploy auf stechuhr3 - name: Deploy auf stechuhr3
env: env:
DEPLOY_HOST: ${{ secrets.TIMECLOCK_DEPLOY_HOST }} DEPLOY_HOST: ${{ vars.TIMECLOCK_DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.TIMECLOCK_DEPLOY_USER }} DEPLOY_USER: ${{ vars.TIMECLOCK_DEPLOY_USER }}
DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY }} DEPLOY_SSH_PRIVATE_KEY: ${{ secrets.TIMECLOCK_DEPLOY_SSH_PRIVATE_KEY }}
DEPLOY_SSH_KNOWN_HOSTS: ${{ secrets.TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS }} DEPLOY_SSH_KNOWN_HOSTS: ${{ vars.TIMECLOCK_DEPLOY_SSH_KNOWN_HOSTS }}
run: | run: |
set -eu set -eu