blumeops/containers/jobsync/entrypoint.sh
Erich Blume 27039e7fe7 C2(jobsync): impl — fix entrypoint to use local prisma binary
npx is not available in the nix container. Call prisma directly via
node node_modules/prisma/build/index.js instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:39:42 -07:00

15 lines
467 B
Bash

#!/bin/sh
set -e
# Auto-generate AUTH_SECRET if not provided
if [ -z "$AUTH_SECRET" ]; then
AUTH_SECRET="$(node -e "console.log(require('crypto').randomBytes(32).toString('base64'))")"
export AUTH_SECRET
echo "AUTH_SECRET was not set — generated a temporary secret for this container."
fi
# Run Prisma migrations (use local node_modules binary, not npx)
node node_modules/prisma/build/index.js migrate deploy
# Start the Next.js server
exec node server.js