Repository navigation
feat(dev2): deploys without the maintenance page (standby_port); page says down for maintenance - #206
Merged
Merged
Conversation
…the page says down for maintenance A site with sites.d standby_port gets that port as its upstream's nginx backup, and deploy-app.sh starts the new build there before recreating the main container, so a deploy never shows the maintenance page. On for nixamp.com (13216): 37/37 requests 200 through a full redeploy. The page said '<site> is updating' and read as 'coming soon'; it now says '<site> is down for maintenance'. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan41 finding(s) HIGH/CRITICAL: 15 | MEDIUM: 12 | LOW: 14
Snippets are redacted; ThreatCrush never prints matched credential material. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anthony: "make deploys not show the maintenance page" and "it's misleading to say coming soon it should say down for maintenance".
No maintenance page during a deploy (opt-in per site).
sites.d"standby_port"(the app port + 10000 by convention):vhostaddsserver 127.0.0.1:<standby> backup;to the site's keepalive upstream.provisionwritesSTANDBY_PORTintodeploy.env.templates/deploy-app.sh: after a successful build, it starts the new build (app service only) as a separate compose project on the standby port and waits for it to answer, then recreates the main container. While that restarts, nginx's refused connection goes on to the backup. Once the main container is healthy it waits 12 s (nginxfail_timeout) and removes the standby. An EXIT trap removes it on any failure. If the standby never answers (an app that needs sibling services), the deploy carries on as before.Wording.
templates/maintenance.htmlnow says " is down for maintenance. We are updating it and will be back in a minute." instead of " is updating. Back in a moment."Live on dev2: nixamp.com has standby_port 13216 (nginx backup line added by hand, because a re-render would drop the hand-added
$www_toredirect lines in that vhost;deploy-app.shreplaced with this template; backups*.bak-standby). A redeploy of the live sha while probing https://nixamp.com/ once a second gave 37/37 × 200; the one failure was the probe host's own DNS timeout. All rendered maintenance pages were reworded in place.🤖 Generated with Claude Code