mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-02 11:36:01 +01:00
♻️ Migrate from prisma to drizzle (#1434)
* ♻️ Migrate from prisma to drizzle * 🐛 Build issue with CalendarTile * 🚧 Temporary solution for docker container * 🐛 Drizzle not using DATABASE_URL * ♻️ Address pull request feedback * 🐛 Remove console log of env variables * 🐛 Some unit tests not working * 🐋 Revert docker tool changes * 🐛 Issue with board slug page for logged in users --------- Co-authored-by: Thomas Camlong <thomascamlong@gmail.com>
This commit is contained in:
@@ -3,8 +3,20 @@
|
||||
echo "Exporting hostname..."
|
||||
export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:7575"
|
||||
|
||||
echo "Pushing database changes..."
|
||||
prisma db push --skip-generate
|
||||
echo "Migrating database..."
|
||||
yarn ts-node src/migrate.ts & PID=$!
|
||||
# Wait for migration to finish
|
||||
wait $PID
|
||||
|
||||
echo "Reverting to production node_modules..."
|
||||
# Copy specific sqlite3 binary to node_modules
|
||||
cp /app/node_modules/better-sqlite3/build/Release/better_sqlite3.node /app/node_modules_cache/better-sqlite3/build/Release/better_sqlite3.node
|
||||
|
||||
# Remove node_modules and copy cached node_modules
|
||||
rm -r /app/node_modules
|
||||
cp -r /app/node_modules_cache /app/node_modules
|
||||
cp ./temp_package.json package.json
|
||||
cp ./temp_yarn.lock yarn.lock
|
||||
|
||||
echo "Starting production server..."
|
||||
node /app/server.js
|
||||
Reference in New Issue
Block a user