Fix read-only filesystem issue in start.sh

- Remove symlink creation in /app/code (read-only)
- Set HOME=/app/data for Blinko data storage
- Use full path to prisma binary
- Fix seed.js path to dist directory
This commit is contained in:
2025-12-29 17:01:59 -06:00
parent 527e555384
commit 74108fba9b

View File

@@ -42,17 +42,20 @@ fi
# Set timezone if configured # Set timezone if configured
export TZ="${TZ:-UTC}" export TZ="${TZ:-UTC}"
# Link data directory for Blinko # Set HOME to /app/data so Blinko stores data there
ln -sfn /app/data/.blinko /app/code/.blinko export HOME=/app/data
# Create .blinko in the data directory (writable location)
mkdir -p /app/data/.blinko
# Run database migrations # Run database migrations
echo "=> Running database migrations..." echo "=> Running database migrations..."
cd /app/code cd /app/code
npx prisma migrate deploy --schema=/app/code/prisma/schema.prisma /app/code/node_modules/.bin/prisma migrate deploy --schema=/app/code/prisma/schema.prisma
# Seed database if needed # Seed database if needed
echo "=> Checking database seed..." echo "=> Checking database seed..."
node /app/code/server/seed.js 2>/dev/null || true node /app/code/dist/seed.js 2>/dev/null || true
# Configure NGINX # Configure NGINX
cp /app/code/nginx.conf /run/nginx.conf cp /app/code/nginx.conf /run/nginx.conf