amber-backend/docker-compose.yml
Claude 0b65fd7f49 Family onboarding site: invite-gated signup, template config, /get/tv
Distribution site served by PocketBase itself (pb_public/, same origin):
- Landing (/): create-account CTA, TV sign-in steps, login-gated PC
  downloads via the existing update manifest + file tokens
- Wizard (/onboarding.html): invite code -> account -> named default
  profile -> family template fetched and encrypted IN THE BROWSER under
  the new user's password (PBKDF2-210k + AES-GCM, byte-compatible with
  the app's AddonConfigCrypto - a wizard blob decrypts in Dart, verified)
  -> pushed as their addon_config ciphertext. Adult fields never included.
- /get/tv: public direct download of the latest clean Android APK
  (Downloader-friendly; adult builds stay account-gated)

Backend:
- onboarding_template collection (admin-only, maintained via admin UI)
- AMBER_INVITE_CODE env gates BOTH users creation (X-Amber-Invite header
  or ?invite=) and the template route (per-IP rate limit 10/5min);
  fail-closed when unset. Note: this closes the previously-open in-app
  registration too.
- Dockerfile ships pb_public + --publicDir; compose passes the env var

Contract + Coolify steps (second domain amber.petruzalekr.cz) in
docs/onboarding-contract.md. Verified locally end-to-end against
pocketbase 0.39.6 (real-browser wizard run + Dart decrypt interop).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 18:23:05 +02:00

20 lines
598 B
YAML

# Local development / verification only. On Coolify, deploy the Dockerfile as an
# application resource (see README) — Coolify manages the domain, TLS and volume.
services:
pocketbase:
build:
context: .
args:
PB_VERSION: 0.39.6
ports:
- "8090:8090"
environment:
# Family invite code (onboarding.pb.js). Unset → registration + template
# route fail closed. Locally: AMBER_INVITE_CODE=test docker compose up.
AMBER_INVITE_CODE: ${AMBER_INVITE_CODE:-}
volumes:
- pb_data:/pb_data
restart: unless-stopped
volumes:
pb_data: