Two root causes for seeding not working on production:
1. Origin mismatch: The seeder writes content IDs as
http://localhost:7777/content/... but the app was using
window.location.origin (the user's actual browser URL) to
query the relay. Introduced VITE_CONTENT_ORIGIN env var
baked into the Docker build so both sides use the same origin.
2. Dockerfile.seed fragility: Replaced --omit=dev + global tsx
with a cleaner approach that strips sharp from package.json
(the only native dep that fails on Alpine) then does a full
npm install, ensuring tsx/esbuild and all applesauce deps
resolve correctly.
Also improved wait-for-relay to accept any HTTP response (some
relays return 4xx for plain GET) and increased max attempts.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Install tsx globally to avoid lockfile conflicts with --omit=dev
- Use set -ex in CMD so Docker logs show exactly which step fails
- Production deps installed cleanly via npm ci --omit=dev
Co-authored-by: Cursor <cursoragent@cursor.com>
- Use npm ci --omit=dev to avoid building sharp (needs native libvips
not available on Alpine) then install tsx separately
- Change app depends_on from seeder (service_completed_successfully)
to relay only, so the app still starts even if seeding fails
Co-authored-by: Cursor <cursoragent@cursor.com>
The --ignore-scripts flag prevented esbuild (used by tsx) from
downloading its platform binary, causing the seed scripts to
fail with exit 1 in the Docker container.
Co-authored-by: Cursor <cursoragent@cursor.com>
- Add nostr-rs-relay service to docker-compose for persistent
comments, reactions, and profiles on the dev server
- Add one-shot seeder container that auto-populates the relay
with test personas, reactions, and comments on first deploy
- Proxy WebSocket connections through nginx at /relay so the
frontend connects to the relay on the same host (no CORS)
- Make relay URL dynamic: reads from VITE_NOSTR_RELAYS in dev,
auto-detects /relay proxy path in production Docker builds
- Make seed scripts configurable via RELAY_URL and ORIGIN env vars
- Add wait-for-relay script for reliable container orchestration
- Add "Resume last played" hero banner on My List tab
Co-authored-by: Cursor <cursoragent@cursor.com>