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:
10
ct/spliit.sh
10
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"
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user