2023-08-05 00:45:58 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2023-08-05 11:33:29 +02:00
|
|
|
echo "Exporting hostname..."
|
2023-11-18 14:42:47 +00:00
|
|
|
export NEXTAUTH_URL_INTERNAL="http://$HOSTNAME:${PORT:-7575}"
|
2023-11-11 15:34:30 +01:00
|
|
|
|
2023-10-08 12:10:48 +02:00
|
|
|
echo "Migrating database..."
|
2023-11-12 01:02:26 +01:00
|
|
|
cd ./migrate; yarn db:migrate & PID=$!
|
2023-10-08 12:10:48 +02:00
|
|
|
# Wait for migration to finish
|
|
|
|
|
wait $PID
|
|
|
|
|
|
2023-11-14 20:31:39 +01:00
|
|
|
## If 'default.json' does not exist in '/app/data/configs', we copy it from '/app/data/default.json'
|
|
|
|
|
cp -n /app/data/default.json /app/data/configs/default.json
|
|
|
|
|
|
2023-08-05 11:33:29 +02:00
|
|
|
echo "Starting production server..."
|
2023-11-13 20:04:44 +01:00
|
|
|
node /app/server.js & PID=$!
|
|
|
|
|
|
|
|
|
|
wait $PID
|