Skip to content

Self-host on Argus at policai.org - #72

Merged
l0cka merged 2 commits into
mainfrom
feat/argus-hosting
Aug 6, 2026
Merged

Self-host on Argus at policai.org#72
l0cka merged 2 commits into
mainfrom
feat/argus-hosting

Conversation

@l0cka

@l0cka l0cka commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Moves hosting from Vercel to the Argus server, served at policai.org behind a dedicated Cloudflare tunnel.

Design: docs/hosting-argus.md, added in the first commit.

Why the domain changes

policai.com.au appeared in four places and is not a live domain. One of them is the collector's User-Agent, which is how it identifies itself to the government sites it fetches — that URL should resolve.

www.policai.org redirects to the apex in next.config.ts rather than as a Cloudflare rule. The tunnel answers for both hostnames, and keeping the canonical choice in the repository means it is reviewable, testable, and survives a move between hosts.

Already running on Argus

Both units are up and enabled, bound to loopback, with no public change yet — policai.org still resolves to its placeholder origin.

policai.service              active, enabled   127.0.0.1:8794
cloudflared-policai.service  active, enabled   4 healthy connections (syd06/syd08)

Verified over SSH: homepage 200 in 19 ms, /policies/<id> 200, /api/policies returning JSON.

The policai tunnel was created through the Cloudflare API rather than cloudflared tunnel login, because that command would have overwritten the cert.pem the live desk-webapp tunnel depends on. cert.pem is untouched and both tideflow tunnels still report 4 healthy connections.

Docs

AGENTS.md, README.md and docs/collector.md described Vercel and a redeploy-on-push model. Data commits are now picked up by ISR within the hour without a rebuild, because data-service reads its JSON from disk at request time.

Still to come, after this merges

  1. Argus pulls and rebuilds on this commit
  2. DNS cutover — delete the two placeholder A records, route both hostnames to the tunnel
  3. Verify externally, then retire Vercel after one collection cycle

Replacing the GitHub Actions collector with a scheduled run on Argus is deliberately a separate phase.

Verification

npm run check — lint, typecheck, 413 tests, build.

🤖 Generated with Claude Code

l0cka and others added 2 commits August 7, 2026 09:03
Phase 1 only: serve the register from Argus at policai.org and retire the
Vercel deployment. Records the live recon it is based on, and carries the
Phase 2 findings forward so the collector work starts from evidence.

Filed under docs/ rather than docs/superpowers/, which this repo ignores.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The site moves from Vercel to the Argus server, served by `next start`
behind a dedicated Cloudflare tunnel.

- Replace the four `policai.com.au` references with `policai.org`. That
  domain was never live. One of them is the collector's User-Agent, which
  is how it identifies itself to the government sites it fetches, so the
  URL in it should resolve.
- Redirect `www.policai.org` to the apex in `next.config.ts`. The tunnel
  answers for both hostnames, so the canonical choice belongs in the
  repository rather than in a Cloudflare rule nobody can see from the code.
- Update AGENTS.md, README.md and docs/collector.md, which described
  Vercel and a redeploy-on-push model that no longer applies. Data commits
  are now picked up by ISR without a rebuild.

Gate: lint, typecheck, 413 tests, build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
policai Ready Ready Preview Aug 6, 2026 11:16pm

@l0cka
l0cka merged commit 1a4b5fa into main Aug 6, 2026
2 checks passed
@l0cka
l0cka deleted the feat/argus-hosting branch August 6, 2026 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant