Bring the checklist app under version control
The project has lived only as a folder on the Mac Studio and, briefly, as a transfer tarball. This is the first commit: the Express server and its web front end, the Capacitor iOS and Android wrappers, and the release and backup scripts. The repo is the source, not a backup of the machine. Left out on purpose, by the .gitignore files that were already in the tree: node_modules, build output, mobile/www (regenerated from server/public on every build), and server/data, which holds the live checklists and belongs on the NAS rather than in git. Every credential is excluded too — server/.env, the Play upload keystore and its properties file, the App Store Connect key and ios-signing.config. The one secret that was not in an ignored file was the NAS SSH password, hard-coded in build-deploy.sh and grepped back out of it by backup-to-drive.sh. Both now read it from the login keychain (service checklist-nas, account Christian), falling back to NAS_PASS in the environment, so rotating it is one keychain entry rather than a history rewrite. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Updating the Recurring Checklist server</title>
|
||||
<style>
|
||||
@page { margin: 0.7in; }
|
||||
html, body {
|
||||
font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
|
||||
color: #1a1a1a;
|
||||
line-height: 1.6;
|
||||
font-size: 12pt;
|
||||
background: #fff;
|
||||
margin: 0;
|
||||
padding: 36px 44px;
|
||||
max-width: 820px;
|
||||
}
|
||||
h1 { font-size: 24pt; margin: 0 0 4px; color: #1f2937; }
|
||||
h2 { font-size: 14pt; margin: 24px 0 6px; color: #1f2937; padding-bottom: 4px; border-bottom: 2px solid #3498db; }
|
||||
h3 { font-size: 12pt; margin: 16px 0 4px; color: #2c3e50; }
|
||||
p { margin: 6px 0 8px; }
|
||||
ol, ul { margin: 6px 0 12px 22px; padding: 0; }
|
||||
li { margin: 5px 0; }
|
||||
code {
|
||||
background: #f1f3f5;
|
||||
padding: 1px 5px;
|
||||
border-radius: 3px;
|
||||
font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
||||
font-size: 10.5pt;
|
||||
color: #c7254e;
|
||||
}
|
||||
pre {
|
||||
background: #1f2937; color: #f8f9fa;
|
||||
padding: 10px 14px; border-radius: 6px;
|
||||
font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
|
||||
font-size: 10pt; line-height: 1.4;
|
||||
}
|
||||
.lede { color: #4b5563; font-size: 12pt; margin: 4px 0 14px; }
|
||||
.callout {
|
||||
border-left: 4px solid #3498db;
|
||||
background: #ecf6fd;
|
||||
padding: 8px 12px;
|
||||
margin: 12px 0;
|
||||
border-radius: 0 4px 4px 0;
|
||||
font-size: 10.5pt;
|
||||
}
|
||||
.callout.warn { border-color: #f39c12; background: #fff7e6; }
|
||||
.step { margin: 10px 0 18px; padding-left: 0; }
|
||||
.step-num {
|
||||
display: inline-block;
|
||||
background: #3498db;
|
||||
color: #fff;
|
||||
width: 26px; height: 26px;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
font-weight: 600;
|
||||
margin-right: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>Updating the Recurring Checklist server</h1>
|
||||
<p class="lede">5-minute guide for pushing new app versions to the Synology NAS</p>
|
||||
|
||||
<h2>Before you start</h2>
|
||||
<ul>
|
||||
<li>The developer will give you a file called <code>checklist-deploy.tgz</code>.</li>
|
||||
<li>Your data (everything people have ticked off) and your settings (<code>.env</code>) are kept on the NAS and never touched by an update. Only the app code changes.</li>
|
||||
<li>You only need access to <strong>File Station</strong> and <strong>Container Manager</strong> on the Chronicles-NA Synology.</li>
|
||||
</ul>
|
||||
|
||||
<h2>The 5 steps</h2>
|
||||
|
||||
<div class="step">
|
||||
<p><span class="step-num">1</span><strong>Open File Station</strong> on Chronicles-NA and navigate to:</p>
|
||||
<pre>docker → recurring-checklist</pre>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<p><span class="step-num">2</span><strong>Drag the new <code>checklist-deploy.tgz</code></strong> into that folder. If File Station asks about overwriting, choose <em>Overwrite</em>.</p>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<p><span class="step-num">3</span><strong>Extract it</strong> — Synology does this in two passes:</p>
|
||||
<ol>
|
||||
<li>Right-click <code>checklist-deploy.tgz</code> → <strong>Extract</strong> → <strong>Extract here</strong>. A <code>checklist-deploy.tar</code> appears next to it.</li>
|
||||
<li>Right-click <code>checklist-deploy.tar</code> → <strong>Extract</strong> → <strong>Extract here</strong>. When it asks about overwriting files, say <strong>“Overwrite all”</strong> or <strong>“Yes to all”</strong>.</li>
|
||||
</ol>
|
||||
<div class="callout">
|
||||
<strong>Don’t worry about overwriting.</strong> The tarball is built so it can’t touch <code>.env</code> or <code>data/</code>. The only files that change are the app code: <code>server.js</code>, <code>public/*</code>, <code>Dockerfile</code>, etc.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<p><span class="step-num">4</span><strong>Clean up the leftovers</strong>. Delete:</p>
|
||||
<ul>
|
||||
<li><code>checklist-deploy.tgz</code></li>
|
||||
<li><code>checklist-deploy.tar</code></li>
|
||||
<li>The <code>PaxHeader</code> folder (it’s just tar metadata)</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<p><span class="step-num">5</span><strong>Rebuild the container</strong> in Container Manager:</p>
|
||||
<ol>
|
||||
<li>Open <strong>Container Manager</strong>.</li>
|
||||
<li>Click <strong>Project</strong> in the left sidebar.</li>
|
||||
<li>Click the row <strong>recurring-checklist</strong> to select it.</li>
|
||||
<li>Click the <strong>Action</strong> dropdown above the list → choose <strong>Build</strong>.</li>
|
||||
<li>A log window pops up. Wait ~30–60 seconds until you see <code>Exit Code: 0</code> at the bottom. Click <strong>Close</strong>.</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
<h2>Verify it worked</h2>
|
||||
<ol>
|
||||
<li>Open <code>https://check.watersmedia.org</code> in a browser.</li>
|
||||
<li>Hard-refresh with <strong>Cmd + Shift + R</strong> (or Ctrl + Shift + R on Windows). This clears any cached old JavaScript.</li>
|
||||
<li>The page should load normally, with whatever new feature the developer described in the release.</li>
|
||||
</ol>
|
||||
|
||||
<h2>If something looks broken</h2>
|
||||
<ol>
|
||||
<li><strong>Check container logs.</strong> Container Manager → <strong>Container</strong> tab → <code>recurring-checklist</code> → <strong>Details</strong> → <strong>Log</strong> tab. Look for red error lines near the bottom.</li>
|
||||
<li><strong>Restart the container.</strong> Container Manager → Project → <strong>recurring-checklist</strong> → Action → <strong>Stop</strong>, then Action → <strong>Start</strong>.</li>
|
||||
<li><strong>Restore your data</strong> if a release accidentally corrupted state: Hyper Backup → <em>Recurring Checklist</em> task → <strong>Restore Data</strong> → pick a recent backup → restore just the <code>data/</code> folder.</li>
|
||||
<li><strong>Roll back.</strong> Keep the previous release’s <code>.tgz</code> archived. To roll back, extract it over the current code (overwriting), then rebuild. Your data stays intact.</li>
|
||||
</ol>
|
||||
|
||||
<div class="callout warn">
|
||||
<strong>Always keep the previous release’s <code>.tgz</code> for at least a week.</strong> If a new release introduces a bug, you can roll back in under a minute by extracting the old one and rebuilding.
|
||||
</div>
|
||||
|
||||
<h2>Quick reference</h2>
|
||||
<ul>
|
||||
<li><strong>Code location on NAS:</strong> <code>/volume1/docker/recurring-checklist/</code></li>
|
||||
<li><strong>Data file:</strong> <code>/volume1/docker/recurring-checklist/data/checklists.json</code></li>
|
||||
<li><strong>Settings file:</strong> <code>/volume1/docker/recurring-checklist/.env</code></li>
|
||||
<li><strong>Public URL:</strong> <code>https://check.watersmedia.org</code></li>
|
||||
<li><strong>Direct LAN URL:</strong> <code>http://10.1.1.1:3000</code></li>
|
||||
<li><strong>Backup destination:</strong> Google Drive, signed in as <code>media@waterschurch.org</code></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user