From 6e5e10a81ea3d4144906f77dac7fdbda0cd4546e Mon Sep 17 00:00:00 2001 From: Pablo Espinel Date: Tue, 17 Feb 2026 16:51:34 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- ct/strapi.sh | 2 +- install/strapi-install.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ct/strapi.sh b/ct/strapi.sh index 6d6a789bb..98e4e4b30 100755 --- a/ct/strapi.sh +++ b/ct/strapi.sh @@ -31,7 +31,7 @@ function update_script() { NODE_VERSION="20" setup_nodejs msg_info "Updating ${APP} LXC" - cd /opt/strapi || exit + cd /opt/strapi $STD npm run build systemctl restart strapi msg_ok "Updated successfully!" diff --git a/install/strapi-install.sh b/install/strapi-install.sh index 15bb52e07..b6b866328 100755 --- a/install/strapi-install.sh +++ b/install/strapi-install.sh @@ -15,7 +15,6 @@ update_os msg_info "Installing Dependencies" $STD apt install -y \ - ca-certificates \ build-essential \ python3 \ python3-setuptools \ @@ -26,12 +25,12 @@ NODE_VERSION="20" setup_nodejs msg_info "Installing Strapi (Patience)" mkdir -p /opt/strapi -cd /opt/strapi || exit +cd /opt/strapi $STD npx --yes create-strapi-app@latest . --quickstart --no-run --skip-cloud msg_ok "Installed Strapi" msg_info "Building Strapi" -cd /opt/strapi || exit +cd /opt/strapi export NODE_OPTIONS="--max-old-space-size=3072" $STD npm run build msg_ok "Built Strapi" @@ -55,6 +54,7 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/strapi +EnvironmentFile=/opt/strapi/.env ExecStart=/usr/bin/npm run start Restart=on-failure Environment=NODE_ENV=production