Skip to main content

max / makenotwork

Root the app-down error page where Sando actually deploys The 502 handler read /opt/makenotwork/error-pages, legacy deploy.sh's REMOTE_DIR. Sando's release_root is /opt/mnw, so that directory does not exist on prod and the app-down page served Caddy's bare 404 instead of the branded one. Point it through the current symlink so it follows every release.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-07-30 01:02 UTC
Signed with PGP, not checked
Commit: 7e57670406af73783f0613eabf13d6c74f561b56
Parent: 103c598
1 file changed, +5 insertions, -3 deletions
@@ -49,8 +49,10 @@
49 49 #
50 50 # The catch-all stays a file read. It fires when the app is unreachable,
51 51 # which is precisely when the app cannot render its own page, so 502.html
52 - # must exist on disk. Sando ships error-pages/ as a release sibling and
53 - # /opt/makenotwork/error-pages symlinks to current/error-pages.
52 + # must exist on disk. Sando ships error-pages/ inside each release, so the
53 + # root goes through the `current` symlink and follows every deploy. It is NOT
54 + # /opt/makenotwork/error-pages: that was legacy deploy.sh's REMOTE_DIR, and
55 + # pointing at it left the app-down page serving Caddy's bare 404 instead.
54 56 handle_errors {
55 57 @404 expression {err.status_code} == 404
56 58 handle @404 {
@@ -63,7 +65,7 @@
63 65 reverse_proxy localhost:3000
64 66 }
65 67 handle {
66 - root * /opt/makenotwork/error-pages
68 + root * /opt/mnw/current/error-pages
67 69 rewrite * /502.html
68 70 file_server
69 71 }