mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-10 22:01:16 +00:00
- Replace next/font/google Geist imports with geist npm package to eliminate Google Fonts CDN network dependency during Docker image builds (was causing intermittent build failures → redeployment errors) - Use ./node_modules/.bin/prisma directly in docker-entrypoint.sh instead of npx for both migrate deploy and db seed commands Co-authored-by: xCyanGrizzly <53275238+xCyanGrizzly@users.noreply.github.com>
22 lines
631 B
Bash
22 lines
631 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
# Guard: refuse to start with the placeholder AUTH_SECRET
|
|
if [ "$AUTH_SECRET" = "change-me-to-a-random-secret-in-production" ] || [ -z "$AUTH_SECRET" ]; then
|
|
echo "ERROR: AUTH_SECRET is not set or still uses the placeholder value."
|
|
echo "Generate one with: openssl rand -base64 32"
|
|
echo "Then set it in your .env file."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Running database migrations..."
|
|
./node_modules/.bin/prisma migrate deploy
|
|
|
|
if [ "$SEED_DATABASE" = "true" ]; then
|
|
echo "Seeding database..."
|
|
./node_modules/.bin/prisma db seed || echo "Seeding skipped or already done."
|
|
fi
|
|
|
|
echo "Starting application..."
|
|
exec "$@"
|