Skip to content

WP-21: one-box Sepolia deploy under infra/ (Caddy + qBittorrent + Kubo + seed + registrar + indexer) - #26

Merged
cursor[bot] merged 6 commits into
masterfrom
wp-21-infra
Sep 14, 2026
Merged

cursor[bot] merged 6 commits into
masterfrom
wp-21-infra

Conversation

@jefflau

@jefflau jefflau commented Sep 14, 2026

Copy link
Copy Markdown
Owner

infra/ per MVP.md §1 ("docker compose, deploy notes") so the Sepolia MVP services run on one Docker VM.

  • docker-compose.yml: caddy (automatic HTTPS for seed1., registrar., index.<DOMAIN>), qbittorrent (6881 tcp/udp), kubo (swarm 4001 published; API internal), seed-api, registrar (PGlite volume, DATABASE_URL optional), indexer (Ponder :42069, PGlite volume); healthchecks, restart policies, resource notes; all secrets via infra/.env (.env.example documents every variable).
  • deploy.sh <user@host>: rsync (no node_modules/dist/.git/.env logs), docker compose up -d --build, waits for the three health endpoints; bootstrap-remote.sh <user@host> [--tier] [--limit] runs the bootstrap runner on the box against the same env (state persisted via new ENSPACK_BOOTSTRAP_STATE).
  • .github/workflows/nightly-health.yml curls the three health endpoints (skips without INFRA_BASE_DOMAIN).
  • Service Dockerfiles only gain COPY infra/package.json for the new workspace member; no TypeScript changes in services.

Acceptance → tests (infra/test/*.test.ts, 13)

  • compose parses, exactly seven services, only 80/443/6881/4001 published, every service has restart + healthcheck, every ${VAR} documented in .env.example, no key/token-looking values.
  • bash -n on both scripts, host-arg guard, no secret echo; workflow YAML parses.

Proof

Root pnpm check after rebase onto master: all green (infra 13, bootstrap 14, plus all prior suites). Unproven (no Docker here or in CI, no box yet): image builds / compose up, ACME issuance, qBittorrent first-boot password flow, live bootstrap on the box. SPEC.md / schema/* untouched.

Open in Web Open in Cursor 

jefflau and others added 6 commits September 14, 2026 15:27
Caddy (auto HTTPS) reverse-proxies seed1/registrar/index, with qBittorrent
swarm 6881, Kubo swarm 4001, and seed-api/registrar/indexer on the compose
network only. PGlite volumes by default. Bootstrap is a compose profile.

Co-authored-by: Jeff Lau <jefflau@users.noreply.github.com>
Idempotent rsync+compose deploy over BatchMode SSH. Remote bootstrap runs
enspack-bootstrap plan/run in the bootstrap profile. Nightly workflow curls
the three /v1/health endpoints and skips without INFRA_BASE_DOMAIN.

Co-authored-by: Jeff Lau <jefflau@users.noreply.github.com>
@enspack/infra is a workspace package with check. Tests parse compose
(seven services, published ports, healthchecks, env vars, no keys),
bash -n both scripts, and parse the nightly workflow YAML. No Docker.

Co-authored-by: Jeff Lau <jefflau@users.noreply.github.com>
Minimal env plumbing so the one-box volume can hold resume state.
Service Dockerfiles copy infra/package.json so pnpm workspace installs
still resolve. Root README points at infra/README.md.

Co-authored-by: Jeff Lau <jefflau@users.noreply.github.com>
Co-authored-by: Jeff Lau <jefflau@users.noreply.github.com>
Co-authored-by: Jeff Lau <jefflau@users.noreply.github.com>
@cursor
cursor Bot merged commit 68f5803 into master Sep 14, 2026
1 check passed
@cursor
cursor Bot deleted the wp-21-infra branch September 14, 2026 15:36
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