Without a household row the signIn callback has nothing to attach the first user to, causing "No household membership" on first load. Add scripts/seed.mjs (plain ESM, only needs postgres which is already in the image) and run it from the entrypoint after migrations. Idempotent — skips if a household already exists. Default calendars/lists are created by the signIn callback when the first user authenticates. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
253 B
Bash
14 lines
253 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
if [ "${RUN_MIGRATIONS:-true}" = "true" ]; then
|
|
echo "running migrations..."
|
|
node /app/scripts/migrate.mjs
|
|
else
|
|
echo "skipping migrations (RUN_MIGRATIONS=$RUN_MIGRATIONS)"
|
|
fi
|
|
|
|
node /app/scripts/seed.mjs
|
|
|
|
exec node /app/server.js
|