Apply suggestions from code review
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
94d050315f
commit
6e5e10a81e
@ -31,7 +31,7 @@ function update_script() {
|
|||||||
NODE_VERSION="20" setup_nodejs
|
NODE_VERSION="20" setup_nodejs
|
||||||
|
|
||||||
msg_info "Updating ${APP} LXC"
|
msg_info "Updating ${APP} LXC"
|
||||||
cd /opt/strapi || exit
|
cd /opt/strapi
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
systemctl restart strapi
|
systemctl restart strapi
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
|
|||||||
@ -15,7 +15,6 @@ update_os
|
|||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
ca-certificates \
|
|
||||||
build-essential \
|
build-essential \
|
||||||
python3 \
|
python3 \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
@ -26,12 +25,12 @@ NODE_VERSION="20" setup_nodejs
|
|||||||
|
|
||||||
msg_info "Installing Strapi (Patience)"
|
msg_info "Installing Strapi (Patience)"
|
||||||
mkdir -p /opt/strapi
|
mkdir -p /opt/strapi
|
||||||
cd /opt/strapi || exit
|
cd /opt/strapi
|
||||||
$STD npx --yes create-strapi-app@latest . --quickstart --no-run --skip-cloud
|
$STD npx --yes create-strapi-app@latest . --quickstart --no-run --skip-cloud
|
||||||
msg_ok "Installed Strapi"
|
msg_ok "Installed Strapi"
|
||||||
|
|
||||||
msg_info "Building Strapi"
|
msg_info "Building Strapi"
|
||||||
cd /opt/strapi || exit
|
cd /opt/strapi
|
||||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
export NODE_OPTIONS="--max-old-space-size=3072"
|
||||||
$STD npm run build
|
$STD npm run build
|
||||||
msg_ok "Built Strapi"
|
msg_ok "Built Strapi"
|
||||||
@ -55,6 +54,7 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/strapi
|
WorkingDirectory=/opt/strapi
|
||||||
|
EnvironmentFile=/opt/strapi/.env
|
||||||
ExecStart=/usr/bin/npm run start
|
ExecStart=/usr/bin/npm run start
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user