Skip to content

Track A: self-host release — Docker, config check, health page, releases - #7

Merged
erikgoins merged 4 commits into
mainfrom
feature/self-host
Nov 10, 2026
Merged

erikgoins merged 4 commits into
mainfrom
feature/self-host

Conversation

@erikgoins

Copy link
Copy Markdown
Contributor

Roadmap Track A (decisions 023, 024). Makes Gitwork self-hostable from the README.

What

  • Docker: Dockerfile (standalone Next, node:22-slim, non-root), docker-compose.yml with an optional Caddy TLS profile. Migrations run at start; a configuration error stops the container and names the variable.
  • Config check: checkConfig() in packages/server, logged at every production start on Node.
  • /setup/health for instance admins: version, runtime, driver, config problems, GitHub App, installations, last webhook, last reconcile.
  • Backups: node backup.mjs <file> in the container (VACUUM INTO, safe while running).
  • Cloudflare: pnpm deploy:cf (build, migrate D1, deploy).
  • Releases: tag v*.*.* → ghcr.io/flywheelstudio/gitwork (amd64 + arm64) + GitHub Release.
  • DCO check on pull requests (decision 024). All commits in this PR are signed off.
  • Repo: README rewrite, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, CHANGELOG, issue/PR templates, docs/self-host/ guide. Starter SVGs removed.
  • pnpm smoke fails above 10 MiB gzipped (decision 022 follow-up). Today: 3,496 KiB.

Tested

  • pnpm lint, pnpm typecheck, pnpm test (368 passed), pnpm test:e2e (7 passed), pnpm smoke (both runtimes): all pass locally.
  • The standalone server laid out like the image: unconfigured start exits 1; configured start migrates a fresh DB and passes scripts/selfhost-check.sh (health, email-code sign-in, /setup, /setup/health); backup works and refuses to overwrite.
  • Not run locally: docker build — no Docker on the dev machine. The new CI docker job is the first real image build.

Not in this PR

  • Deploy to Cloudflare button. Cloudflare's button needs the app isolated in one folder; Gitwork's Worker uses workspace packages. Verifying it needs a real deploy to a Cloudflare account (owner approval).
  • Live GitHub check (the Phase 7 exit check's GitHub half): blocked on a public tunnel.
  • Owner action: turn on private vulnerability reporting in repo settings (SECURITY.md links to it).

Merge after #5 and #6: STATE.md and INDEX.md will need a small conflict fix.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T7sHybpLbFAyRXzPFkfWun

erikgoins and others added 3 commits November 10, 2026 08:56
…ckups, releases

- Dockerfile (standalone Next, node:22-slim, non-root), docker-compose.yml with an
  optional Caddy TLS profile, migrations at start, refuse to start on a config error.
- checkConfig()/instanceHealth() in packages/server; /setup/health for instance admins.
- scripts/backup.mjs (VACUUM INTO), scripts/selfhost-check.sh, pnpm deploy:cf.
- CI: docker job runs the self-host exit check; release.yml publishes to GHCR on tags;
  dco.yml checks sign-offs (decision 024). smoke fails above 10 MiB gzipped.
- README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT, CHANGELOG, templates, guide.
- E2E outbox helper waits for a newer email, so a second sign-in never reads an old code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7sHybpLbFAyRXzPFkfWun
Signed-off-by: Erik Goins <erikgoins@gmail.com>
Docker's port proxy resets the connection (curl exit 56) before the server listens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7sHybpLbFAyRXzPFkfWun
Signed-off-by: Erik Goins <erikgoins@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T7sHybpLbFAyRXzPFkfWun
Signed-off-by: Erik Goins <erikgoins@gmail.com>
Signed-off-by: Erik Goins <erikgoins@gmail.com>

# Conflicts:
#	docs/STATE.md
@erikgoins
erikgoins merged commit 20089f2 into main Nov 10, 2026
3 checks passed
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