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:
11
start.sh
11
start.sh
@@ -42,17 +42,20 @@ fi
|
||||
# Set timezone if configured
|
||||
export TZ="${TZ:-UTC}"
|
||||
|
||||
# Link data directory for Blinko
|
||||
ln -sfn /app/data/.blinko /app/code/.blinko
|
||||
# Set HOME to /app/data so Blinko stores data there
|
||||
export HOME=/app/data
|
||||
|
||||
# Create .blinko in the data directory (writable location)
|
||||
mkdir -p /app/data/.blinko
|
||||
|
||||
# Run database migrations
|
||||
echo "=> Running database migrations..."
|
||||
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
|
||||
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
|
||||
cp /app/code/nginx.conf /run/nginx.conf
|
||||
|
||||
Reference in New Issue
Block a user