Commit Graph

18 Commits

Author SHA1 Message Date
saltbo 0bf1f9e973 feat(webdav): derive fixed domain from public URL 2026-07-20 13:45:22 -04:00
saltbo 75d7b50538 feat(webdav): support optional custom domains
Serve canonical root-relative DAV URLs on a configured hostname while preserving the existing /dav mount. Reconcile Cloudflare rewrite rules and Worker custom domains during fork deployments, and expose the effective URL through site options.
2026-07-20 12:59:58 -04:00
saltbo e17e2018d3 fix(docker): use host hostname for downloader registration 2026-06-07 01:00:35 -04:00
saltbo a1785f67b8 fix(docker): make downloader data volume writable 2026-06-07 00:14:17 -04:00
saltbo 5f83099c7c fix(docker): configure remote downloader runtime 2026-06-06 20:44:08 -04:00
saltbo 475cb46557 fix(docker): use host hostname for downloader 2026-06-06 20:34:16 -04:00
saltbo 7e7eeb4ca7 fix(downloads): expose torrent listen port in docker 2026-06-06 20:26:03 -04:00
saltbo ebe0e426bf fix(downloader): stabilize docker runtime validation 2026-06-06 02:29:35 -04:00
saltbo 9486360389 feat(cli): promote downloader to zpan command 2026-06-06 01:38:16 -04:00
saltbo c19cbbfcac feat(downloader): auto bootstrap device login 2026-06-06 01:26:28 -04:00
saltbo 30bc6e1a12 build: migrate project to pnpm 2026-06-01 10:44:33 -04:00
Jasper Van d33800f23e feat: Azure Functions deployment target (v4, Node 22) (#330)
* feat: add Azure Functions deployment target (v4, Node 22)

- server/entry-azure.ts: Azure Functions v4 handler wrapping the Hono
  app via app.http(); uses createLibsqlPlatform for Turso and serves
  the SPA from ./dist via @hono/node-server/serve-static
- server/azure-host.json: runtime manifest (extensionBundle v4)
- deploy/azure-functions/main.bicep: idempotent Bicep template
  provisioning Storage Account, Consumption plan and Function App;
  BETTER_AUTH_SECRET handled separately by the workflow
- .github/workflows/deploy-azure.yml: 8-step workflow (secret check,
  checkout, Node setup, az login, Bicep deploy, build, db:migrate,
  func publish) with BETTER_AUTH_SECRET generate-if-missing logic
- package.json: build:azure script + @azure/functions dependency
- docs/deploy/azure-functions.md: setup guide covering SP JSON format,
  required secrets, and local emulation with func start

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* fix: address review issues in Azure Functions deploy

- Move BETTER_AUTH_SECRET and APP_URL setup to before func publish
  (bootstrap.ts throws on missing secret; any request between publish
  and the old secret-set step would have returned 500)
- Remove placeholder appUrl Bicep param; workflow sets APP_URL and
  BETTER_AUTH_URL via appsettings after Bicep, before publish
- Fix HttpRequest→Request body handling: construct a proper Web API
  Request with body cast and duplex option instead of double-casting
  HttpRequest, ensuring POST/PUT/PATCH body-reading routes work
- Add push: branches: [master] trigger + upstream guard to match other
  deploy workflow conventions; document the auto-deploy behaviour
- Update docs/deploy/azure-functions.md to reflect the push trigger

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* ci: re-trigger CI for review fixes

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-22 02:08:54 -04:00
Jasper Van 8b72a7dba9 feat: v2.5.0 T6 — Google Cloud Run deployment (service.yaml + workflow + docs) (#332)
* feat: v2.5.0 T6 — Google Cloud Run deployment (service.yaml + workflow + docs)

Add Cloud Run as a first-class deploy target. Reuses the existing root
Dockerfile via gcloud run deploy --source (Cloud Build). Turso for DB,
external S3-compatible storage. Follows the standard 8-step workflow
contract: secret check, release resolution, GCloud auth, Turso migration,
Secret Manager upsert, deploy. min-instances=0 for free-tier eligibility
with cold-start callout in docs.

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* fix: resolve first-deploy failure and drive deploy from service.yaml

BLOCKER: BETTER_AUTH_URL and TURSO_AUTH_TOKEN were passed to --set-secrets
even when the corresponding Secret Manager entries didn't exist yet.
BETTER_AUTH_URL isn't known until after the first deploy (it IS the Cloud
Run service URL). TURSO_AUTH_TOKEN is optional. Both caused 'secret not
found' aborts.

Fix: separate deploy into two phases.
Phase 1 — gcloud run services replace with service.yaml, which only
references the guaranteed secrets (turso-database-url, better-auth-secret).
Phase 2 — post-deploy step captures the service URL, upserts better-auth-url
and (if provided) turso-auth-token in Secret Manager, then wires them into
the running service via gcloud run services update --update-secrets.

MINOR: service.yaml was orphaned — the workflow used gcloud run deploy
--source . with inline flags instead. Rebuilt workflow to use gcloud builds
submit to build the image, then gcloud run services replace to drive the
deploy from the manifest. PROJECT_ID is substituted at deploy time.

Also demote BETTER_AUTH_URL from required to optional GitHub secret
(auto-derived from Cloud Run service URL on first deploy) and update docs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 01:43:34 -04:00
Jasper Van 0f403f8081 feat: v2.5.0 T4 — Netlify deployment target (#329)
* feat: v2.5.0 T4 — Netlify deployment target

- server/entry-netlify.ts: Netlify Functions v2 (ESM) handler using hono/netlify
  adapter; connects to Turso via @libsql/client; skips in-process migrations
  (workflow applies them before deploy via drizzle-kit)
- deploy/netlify/netlify.toml: build command, functions directory, SPA fallback redirect
- .github/workflows/deploy-netlify.yml: 8-step workflow — secret guard, tag resolve,
  Turso migrations, build, netlify deploy --prod, BETTER_AUTH_SECRET first-deploy, summary
- package.json: add build:netlify script (tsup ESM → netlify/functions)
- docs/deploy/netlify.md: 5-section setup guide covering Turso, site creation,
  secrets, deploy trigger, first-boot storage setup, and cost breakdown

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* fix: address Netlify deploy review blockers

BLOCKER 1 — move BETTER_AUTH_SECRET step before Deploy in workflow so
the function always has the secret set before its first cold start.

BLOCKER 2 — replace inline platform construction in entry-netlify.ts
with createLibsqlPlatform(); removes duplicated db/schema wiring and
re-unifies with the shared factory. migrate() runs at cold start and
is idempotent (~50–100ms) per the workflow's prior drizzle-kit migrate.

BLOCKER 3 — add --external @libsql/client to build:netlify so tsup
leaves the native-binding package for Netlify to resolve; switch
netlify.toml to node_bundler=esbuild so Netlify bundles @libsql/client
from node_modules. Add included_files=["migrations/**"] so the
migrations folder is available in the function zip for migrate().

Minor — replace 2>/dev/null with 2>&1 in deploy step so netlify-cli
errors surface in CI logs instead of being silently swallowed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 01:28:08 -04:00
Jasper Van b5be4c5ebd feat: v2.5.0 T2 — AWS Lambda deployment (entry + SAM + workflow + docs) (#331)
- server/entry-lambda.ts: Hono app via hono/aws-lambda handle(); lazy init
  pattern for CJS compatibility and warm-start reuse; serves SPA static
  files from dist/ with MIME detection and index.html fallback
- deploy/aws-lambda/template.yaml: SAM template with Function URL (no API
  Gateway), Node 22, TURSO_* / BETTER_AUTH_SECRET / APP_URL env vars,
  minimal IAM (AWSLambdaBasicExecutionRole)
- .github/workflows/deploy-aws-lambda.yml: 8-step contract (guard upstream,
  check secrets with exact names, resolve tag, checkout, ensure SAM artifact
  bucket, apply Turso migrations, build + sam deploy, post-deploy auto-gen
  BETTER_AUTH_SECRET + patch BETTER_AUTH_URL + write URL to summary)
- package.json: build:lambda script (tsup CJS, external @libsql/client)
- docs/deploy/aws-lambda.md: Prerequisites / Secrets / Trigger /
  First-boot storage / Cost sections
- README.md, V2_ROADMAP.md: link new doc

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-22 01:28:05 -04:00
Jasper Van 5593eec3ce feat: v2.5.0 T3 — Vercel deployment (entry + vercel.json + workflow + docs) (#328)
* feat: add Vercel deployment target (Node runtime + Turso)

Adds first-class Vercel support: server/entry-vercel.ts using hono/vercel
handler, deploy/vercel/vercel.json with nodejs22.x function config and SPA
rewrites, build:vercel npm script producing api/entry-vercel.js + dist/,
deploy-vercel GitHub Actions workflow (8-step: secrets check, tag resolve,
checkout, install, migrate, build, link, deploy), and docs/deploy/vercel.md
documenting secrets, quick-start, local dev, and pricing notes.

Edge runtime is explicitly not used — @aws-sdk/client-s3 requires Node APIs.

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

* fix: auto-generate BETTER_AUTH_SECRET on first Vercel deploy

Remove BETTER_AUTH_SECRET from the required secrets check. Add a
dedicated step that detects whether the secret already exists in the
Vercel project env via `vercel env ls production`, then either upserts
the user-supplied GitHub secret, auto-generates one with openssl on
first deploy, or skips if already present. Auto-generation case appends
a backup warning to GITHUB_STEP_SUMMARY. Docs move BETTER_AUTH_SECRET
to Optional Secrets with a note about the auto-gen behaviour.

Matches the existing CF Workers deploy.yml pattern (step 8 contract).

Agent-Profile: https://agent-kanban.dev/agents/a6bb038c4226a87f

---------

Co-authored-by: Bob <aibob@mails.agent-kanban.dev>
2026-04-22 01:14:54 -04:00
saltbo 14069fadf5 fix: use Docker Hub image for RustFS (rustfs/rustfs)
GHCR image (ghcr.io/rustfs/rustfs) requires authentication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 21:24:23 -04:00
saltbo 0137f009d4 feat(docker): add deploy variants and auto-generate auth secret
- Add --external better-sqlite3 to tsup build to fix ESM runtime error
- Add docker-entrypoint.sh to auto-generate BETTER_AUTH_SECRET if not set
- Persist generated secret to /data/.auth_secret across restarts
- Move image-based compose files to deploy/ directory
- Add deploy/docker-compose.rustfs.yml for ZPan + RustFS setup
- Keep build-from-source docker-compose.yml at project root

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-21 10:41:24 -04:00