spliit: mirror upstream Dockerfile build flow

Use 'npm ci --ignore-scripts' + explicit 'npx prisma generate' instead
of 'npm install' (which triggered postinstall and ran with NODE_ENV=production
from a sourced .env, skipping devDependencies like autoprefixer).
Migrations are run explicitly after build, matching the Dockerfile's
container-entrypoint.sh.
This commit is contained in:
A
2026-05-17 11:33:53 +02:00
parent dc5eae95d8
commit 25052f73c3
2 changed files with 14 additions and 6 deletions

View File

@@ -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"

View File

@@ -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 <<EOF >/etc/systemd/system/spliit.service
[Unit]