Show a static maintenance page while the service restarts
A deployment's ErrorDocument-covered downtime window looked dead: Apache's default 502/503/504 error page, or a hung request, while instance-update briefly restarts the systemd unit. init --systemd now also writes a static werkator-maintenance.html next to the generated .htaccess, and the .htaccess maps a refused connection straight to it — served by Apache alone, no change needed to Werkator itself since it is exactly the process that is down. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
06967c551e
commit
ca9c23d55b
+3
-1
@@ -357,9 +357,11 @@ instance_start() {
|
||||
|
||||
local htaccess_src="$TARGET_DIR/werkator/.git/werkator/werkator.htaccess"
|
||||
local htaccess="$TARGET_DIR/doms/$WERKATOR_DOMAIN/subs/www/.htaccess"
|
||||
local maintenance_src="$TARGET_DIR/werkator/.git/werkator/werkator-maintenance.html"
|
||||
local maintenance="$TARGET_DIR/doms/$WERKATOR_DOMAIN/subs/www/werkator-maintenance.html"
|
||||
if ssh "$HOST" "test -f '$htaccess_src'"; then
|
||||
echo "==> Placing the generated Apache reverse proxy at $htaccess"
|
||||
ssh "$HOST" "mkdir -p '$TARGET_DIR/doms/$WERKATOR_DOMAIN/subs/www' && cp '$htaccess_src' '$htaccess'"
|
||||
ssh "$HOST" "mkdir -p '$TARGET_DIR/doms/$WERKATOR_DOMAIN/subs/www' && cp '$htaccess_src' '$htaccess' && cp '$maintenance_src' '$maintenance'"
|
||||
else
|
||||
echo "==> No werkator.htaccess generated (no server.publicBaseUrl configured) — skipping the Apache proxy"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user