Publish the status page without the apps check (#3)

No canary app runs on the node yet, so the Apps in US East monitor would
show the page as down. It stays in the config, commented out, until one
exists.
This commit is contained in:
michael authored and GitHub committed 2026-11-22 10:03:30 -05:00
1 parent 142ab1358e
commit e9de6c5b69
2 files changed
+20 -21

No files matched your search

+5 -7
View File
@@ -28,15 +28,13 @@ npm run dev # http://localhost:3000, with sample data
Without a D1 database, `npm run dev` shows sample data (`dev/sample.ts`). Add `?sample=outage`, `?sample=maintenance` or `?sample=empty` to see the other states. Production never uses the samples.
## Deploying (at launch)
## Deploying
Not deployed yet: the checks need a canary app to exist (cottage.host now serves both the site and the dashboard). At launch:
Live at status.cottage.host. A push to `main` deploys it through the "Deploy to Cloudflare" workflow, which runs only while the repository variable `CLOUDFLARE_DEPLOY` is `true`. It uses the Actions secrets `CLOUDFLARE_API_TOKEN` (Workers Scripts, D1 and Cloudflare Pages edit on the Cottage account) and `CLOUDFLARE_ACCOUNT_ID`.
1. Put the canary app's address in the `apps-us-east` monitor.
2. Create a Cloudflare API token for the account: Workers Scripts, D1 and Cloudflare Pages edit, plus Zone DNS edit on cottage.host. Save it as the Actions secret `CLOUDFLARE_API_TOKEN` (and `CLOUDFLARE_ACCOUNT_ID`).
3. Set the repository variable `CLOUDFLARE_DEPLOY` to `true` and run the "Deploy to Cloudflare" workflow.
4. In Cloudflare Pages, add the custom domain `status.cottage.host` to the `uptimeflare` project.
5. Link the footer status ("All systems normal") on cottage.host to it; `/api/data` returns the current state as JSON for that.
The "Apps in US East" check is commented out in `uptime.config.ts` until a canary app runs on the node. Once one does, put its address in the `apps-us-east` monitor and uncomment it and its group.
Cottage's footer status ("All systems normal") can read `/api/data`, which returns the current state as JSON.
## Keeping up with upstream
+15 -14
View File
@@ -14,13 +14,12 @@ const pageConfig: PageConfig = {
// Sections, in order. Every monitor below should appear in exactly one.
group: {
Cottage: ['website', 'dashboard'],
'Apps by region': ['apps-us-east'],
// 'Apps by region': ['apps-us-east'], // add back with the monitor below
},
}
const workerConfig: WorkerConfig = {
// Checks run every minute from Cloudflare's network (the location nearest the worker).
// The targets go live at launch; until then the page isn't deployed.
monitors: [
{
id: 'website',
@@ -43,18 +42,20 @@ const workerConfig: WorkerConfig = {
timeout: 10000,
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
},
{
// A small app Cottage runs for itself on the region's servers, so this checks the
// whole path a customer's app takes: Cloudflare, the node's proxy and a running app.
// TODO at launch: deploy the canary app and put its address here.
id: 'apps-us-east',
name: 'Apps in US East',
tooltip: 'Customer apps hosted in Virginia',
method: 'GET',
target: 'https://status-canary-vin1.cottagehost.com/',
timeout: 10000,
headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
},
// Not checked yet: no canary app runs on the node. Deploy one, then uncomment this
// and the 'Apps by region' group above.
// {
// // A small app Cottage runs for itself on the region's servers, so this checks the
// // whole path a customer's app takes: Cloudflare, the node's proxy and a running app.
// // TODO at launch: deploy the canary app and put its address here.
// id: 'apps-us-east',
// name: 'Apps in US East',
// tooltip: 'Customer apps hosted in Virginia',
// method: 'GET',
// target: 'https://status-canary-vin1.cottagehost.com/',
// timeout: 10000,
// headers: { 'User-Agent': 'cottage-status (+https://status.cottage.host)' },
// },
],
// Alerts come from Grafana Cloud (hearth infra/monitoring). A webhook here could page too.
}