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>
1.2 KiB
1.2 KiB