Wire maintenance page into deploy script as a dynamic toggle

Replaces the earlier auto-fallback-on-upstream-error approach with an
explicit flag-file toggle controlled by the deploy script. The flag
is touched before stopping the app and removed on successful finish
(or via trap if the deploy aborts), so a failed deploy doesn't strand
the site in maintenance.

- nginx/goodwalk.co.nz.svelte.conf.example: error_page 503 routes to
  /maintenance.html (internal); /m/ serves static maintenance assets;
  the / and /api/submit blocks return 503 when /etc/nginx/conf.d/
  maintenance.flag exists.
- nginx/maintenance.html: brand-styled "Be right back" page — full
  Goodwalk green background, white card with yellow accent, real
  Goodwalk logo, contact details fallback, auto-reload after 60s.
- nginx/logo.png: maintenance-time logo (served from /m/logo.png).
- nginx/nginx.conf: reverted the earlier auto-fallback edits; this
  file is not deployed (the prod conf is goodwalk.co.nz.svelte.conf
  .example).
- scripts/deploy-remote.sh: copies maintenance.html + logo into the
  nginx container, reloads nginx so the new conf is live, touches
  the flag, then runs the rebuild, then clears the flag. Adds a
  trap-based clear_maintenance_flag fallback. Also adds a defensive
  env-file merger that appends new keys from deploy.env.template
  without clobbering live values, with a timestamped .env backup.

Plus a small a11y polish unrelated to maintenance:
- ServicesSection: "Learn more" links now include screen-reader-only
  "about <Service>" context.
- base.css: adds .visually-hidden utility class.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-05 14:10:16 +12:00
parent 9d87d08547
commit c2e6282efa
7 changed files with 219 additions and 63 deletions
+67 -28
View File
@@ -8,8 +8,8 @@
<style>
:root {
--green: #213021;
--yellow: #FFD100;
--cream: #fbfaf6;
--green-soft: #2c3f2c;
--yellow: #ffd100;
--ink: #1a1a1a;
--muted: #4c5056;
}
@@ -28,7 +28,10 @@
body {
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
color: var(--ink);
background: var(--cream);
background:
radial-gradient(circle at top left, rgba(255, 209, 0, 0.12), transparent 55%),
radial-gradient(circle at bottom right, rgba(255, 209, 0, 0.08), transparent 60%),
var(--green);
min-height: 100vh;
display: grid;
place-items: center;
@@ -36,14 +39,31 @@
line-height: 1.5;
}
.stage {
width: 100%;
max-width: 560px;
}
.brand-bar {
display: flex;
justify-content: center;
margin-bottom: 28px;
}
.brand-bar img {
display: block;
height: 44px;
width: auto;
max-width: 100%;
filter: brightness(0) invert(1);
}
.card {
position: relative;
max-width: 520px;
width: 100%;
background: #fff;
border-radius: 28px;
padding: 44px 40px 40px;
box-shadow: 0 18px 44px rgba(17, 20, 24, 0.08);
padding: 44px 40px 38px;
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
text-align: center;
overflow: hidden;
}
@@ -62,7 +82,7 @@
justify-content: center;
width: 64px;
height: 64px;
margin: 0 auto 20px;
margin: 4px auto 18px;
border-radius: 50%;
background: rgba(33, 48, 33, 0.08);
color: var(--green);
@@ -73,13 +93,13 @@
height: 32px;
}
.brand {
font-size: 13px;
.eyebrow {
font-size: 12px;
font-weight: 700;
letter-spacing: 0.18em;
text-transform: uppercase;
color: var(--green);
margin: 0 0 14px;
margin: 0 0 10px;
}
h1 {
@@ -97,7 +117,7 @@
}
.meta {
margin-top: 22px;
margin-top: 24px;
padding-top: 22px;
border-top: 1px solid rgba(17, 20, 24, 0.08);
font-size: 14px;
@@ -106,7 +126,7 @@
.meta a {
color: var(--green);
font-weight: 600;
font-weight: 700;
text-decoration: none;
}
@@ -114,31 +134,50 @@
text-decoration: underline;
}
.footnote {
margin-top: 22px;
text-align: center;
font-size: 13px;
color: rgba(255, 255, 255, 0.7);
}
@media (max-width: 480px) {
.card {
padding: 36px 24px 28px;
border-radius: 22px;
}
.brand-bar img {
height: 36px;
}
}
</style>
</head>
<body>
<main class="card" role="main">
<span class="paw" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M7.5 10.5c1.1 0 2-1.3 2-3s-.9-3-2-3-2 1.3-2 3 .9 3 2 3Zm9 0c1.1 0 2-1.3 2-3s-.9-3-2-3-2 1.3-2 3 .9 3 2 3ZM4 13.5c1 0 1.8-1.1 1.8-2.5S5 8.5 4 8.5s-1.8 1.1-1.8 2.5S3 13.5 4 13.5Zm16 0c1 0 1.8-1.1 1.8-2.5S21 8.5 20 8.5s-1.8 1.1-1.8 2.5.8 2.5 1.8 2.5ZM12 13.5c-3.3 0-6 2.5-6 5.4 0 1.4 1.1 2.6 2.5 2.6 1 0 1.5-.4 2.2-.8.4-.2.8-.4 1.3-.4s.9.2 1.3.4c.7.4 1.2.8 2.2.8 1.4 0 2.5-1.2 2.5-2.6 0-2.9-2.7-5.4-6-5.4Z"/>
</svg>
</span>
<p class="brand">Goodwalk</p>
<h1>Be right back!</h1>
<p>We're updating the site — should only take a minute. Thanks for your patience.</p>
<div class="meta">
Need us now? Email <a href="mailto:info@goodwalk.co.nz">info@goodwalk.co.nz</a>
or call <a href="tel:+64226421011">(022) 642 1011</a>.
<div class="stage">
<div class="brand-bar">
<img src="/m/logo.png" alt="Goodwalk" width="241" height="48" />
</div>
</main>
<main class="card" role="main">
<span class="paw" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
<path d="M7.5 10.5c1.1 0 2-1.3 2-3s-.9-3-2-3-2 1.3-2 3 .9 3 2 3Zm9 0c1.1 0 2-1.3 2-3s-.9-3-2-3-2 1.3-2 3 .9 3 2 3ZM4 13.5c1 0 1.8-1.1 1.8-2.5S5 8.5 4 8.5s-1.8 1.1-1.8 2.5S3 13.5 4 13.5Zm16 0c1 0 1.8-1.1 1.8-2.5S21 8.5 20 8.5s-1.8 1.1-1.8 2.5.8 2.5 1.8 2.5ZM12 13.5c-3.3 0-6 2.5-6 5.4 0 1.4 1.1 2.6 2.5 2.6 1 0 1.5-.4 2.2-.8.4-.2.8-.4 1.3-.4s.9.2 1.3.4c.7.4 1.2.8 2.2.8 1.4 0 2.5-1.2 2.5-2.6 0-2.9-2.7-5.4-6-5.4Z"/>
</svg>
</span>
<p class="eyebrow">Goodwalk</p>
<h1>Be right back!</h1>
<p>We're updating the site — should only take a minute. Thanks for your patience.</p>
<div class="meta">
Need us now? Email <a href="mailto:info@goodwalk.co.nz">info@goodwalk.co.nz</a>
or call <a href="tel:+64226421011">(022) 642 1011</a>.
</div>
</main>
<p class="footnote">Auckland Central dog walking · Tiny Gang pack walks · 1:1 walks · Puppy visits</p>
</div>
<script>
// Auto-recheck once a minute so visitors don't sit on this page forever.