diff --git a/ct/spliit.sh b/ct/spliit.sh index 3f39714c..6c05f8b1 100755 --- a/ct/spliit.sh +++ b/ct/spliit.sh @@ -47,12 +47,16 @@ function update_script() { msg_info "Building Application" cd /opt/spliit - set -a && source /opt/spliit/.env && set +a - $STD npm install - $STD npm install deepmerge + $STD npm ci --ignore-scripts + $STD npx prisma generate $STD npm run build msg_ok "Built Application" + msg_info "Running Database Migrations" + cd /opt/spliit + $STD npx prisma migrate deploy + msg_ok "Ran Database Migrations" + msg_info "Starting Service" systemctl start spliit msg_ok "Started Service" diff --git a/install/spliit-install.sh b/install/spliit-install.sh index 513e4389..4ab99157 100755 --- a/install/spliit-install.sh +++ b/install/spliit-install.sh @@ -39,12 +39,16 @@ msg_ok "Configured Application" msg_info "Building Application" cd /opt/spliit -set -a && source /opt/spliit/.env && set +a -$STD npm install -$STD npm install deepmerge +$STD npm ci --ignore-scripts +$STD npx prisma generate $STD npm run build msg_ok "Built Application" +msg_info "Running Database Migrations" +cd /opt/spliit +$STD npx prisma migrate deploy +msg_ok "Ran Database Migrations" + msg_info "Creating Service" cat </etc/systemd/system/spliit.service [Unit]