Status-Datei und Deploy-Hook-Pfad explizit in install.env statt implizit abgeleitet
Bisher wurde der Hook-Pfad aus dem letzten Segment von WEBSITE_REPO abgeleitet, die Status-Datei war fix auf ~/deploy/status.json gesetzt. Beides sieht pro Instanz eindeutig aus, ist es aber nicht: Live auf einer Demo-Installation gefunden, bei der zwei Ableger-Instanzen auf demselben Account beide denselben abgeleiteten Hook-Pfad (website.git) erhielten - der Trigger-Button einer Instanz loeste den Deploy der anderen aus, die Status-Seite zeigte dauerhaft 'kein Status vorhanden' statt echter Daten. Neue optionale install.env-Werte DEPLOY_STATUS_FILE/DEPLOY_HOOK_PATH, Default identisch zum bisherigen Standardfall (eine Instanz pro Server) - nur bei mehreren Instanzen auf demselben Account muss man sie anpassen.
This commit is contained in:
+14
@@ -46,3 +46,17 @@ DEPLOY_DOCROOT="/pfad/zu/deinem/docroot"
|
||||
# Port the admin status server (scripts/admin-status-server.rb) listens
|
||||
# on.
|
||||
STATUS_SERVER_PORT="4182"
|
||||
|
||||
# Path to the status file the deploy hook writes after every run, and to
|
||||
# the deploy hook itself (invoked by the manual trigger button on
|
||||
# /admin/status/). Must match the STATUS_FILE/HOOK paths used in your own
|
||||
# post-receive hook script (see the "Installation" chapter, Schritt 7) -
|
||||
# both default to a single-instance-per-server assumption below, which
|
||||
# breaks if you ever run a second Ableger instance (or any other deploy
|
||||
# pipeline whose bare-repo name happens to collide) on the same account:
|
||||
# found live when two Ableger instances on one Uberspace account both
|
||||
# derived the same "website.git" hook path from WEBSITE_REPO, so the
|
||||
# newer instance's trigger button silently ran the OTHER instance's
|
||||
# deploy. Only override these two if that applies to you.
|
||||
DEPLOY_STATUS_FILE="~/deploy/status.json"
|
||||
DEPLOY_HOOK_PATH="~/repos/website.git/hooks/post-receive"
|
||||
|
||||
Reference in New Issue
Block a user