Aktualisiere Umgebungsvariablen-Konfiguration für das Produktions-Deployment
Some checks failed
Deploy production / deploy (push) Failing after 2s
Some checks failed
Deploy production / deploy (push) Failing after 2s
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user