diff --git a/tools/deploy/production-bootstrap.sh b/tools/deploy/production-bootstrap.sh index e0e3b06..203584c 100644 --- a/tools/deploy/production-bootstrap.sh +++ b/tools/deploy/production-bootstrap.sh @@ -191,6 +191,8 @@ EOF write_services() { log "Writing systemd and nginx configuration" + local node_bin + node_bin="$(command -v node)" cat >/etc/systemd/system/cmpp-minio.service <<'EOF' [Unit] Description=CMPP MinIO object storage @@ -216,7 +218,7 @@ After=network.target postgresql.service redis.service cmpp-minio.service [Service] WorkingDirectory=${APP_DIR}/api EnvironmentFile=/etc/cmpp-platform/cmpp-platform.env -ExecStart=/usr/bin/node dist/main.js +ExecStart=${node_bin} dist/main.js Restart=always RestartSec=5 StandardOutput=append:${APP_DIR}/logs/api/stdout.log