fix(DB): migrate the DB on container launch
This commit is contained in:
parent
011d10df29
commit
631906da35
2 changed files with 24 additions and 2 deletions
15
docker-entrypoint.sh
Normal file
15
docker-entrypoint.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "🚀 Starting Perplexica..."
|
||||
|
||||
# Ensure data directory exists
|
||||
mkdir -p /home/perplexica/data
|
||||
|
||||
# Run database schema migration
|
||||
echo "📊 Updating database schema..."
|
||||
npm run db:push
|
||||
|
||||
# Start the application
|
||||
echo "🌐 Starting Next.js server..."
|
||||
exec node server.js
|
||||
Loading…
Add table
Add a link
Reference in a new issue