nuxt generate 4 node limit

This commit is contained in:
Valentin 2024-04-18 14:49:53 +02:00
parent 74ef2ae486
commit 22d5bbdde2
1 changed files with 2 additions and 4 deletions

View File

@ -410,8 +410,6 @@ if [[ "$answer" == "y" ]]; then
rm /var/www/html/* rm /var/www/html/*
chown www-data:www-data /var/www/html chown www-data:www-data /var/www/html
install_pkg cpulimit
su -s /bin/bash -c "cd ${repo_directory} &&\ su -s /bin/bash -c "cd ${repo_directory} &&\
git clone ${repo_url} &&\ git clone ${repo_url} &&\
cd ${front_directory} &&\ cd ${front_directory} &&\
@ -419,8 +417,8 @@ if [[ "$answer" == "y" ]]; then
echo \"DIRECTUS_API_TOKEN=${website_token}\" > .env &&\ echo \"DIRECTUS_API_TOKEN=${website_token}\" > .env &&\
echo \"URL=https://${domain_name}\" >> .env &&\ echo \"URL=https://${domain_name}\" >> .env &&\
echo \"DIRECTUS_URL=https://cms.${domain_name}\" >> .env &&\ echo \"DIRECTUS_URL=https://cms.${domain_name}\" >> .env &&\
npm install -y &&\ node --max-old-space-size=250 `which npm` install -y &&\
cpulimit -l 80 npm run generate --prerender" www-data node --max-old-space-size=250 `which npm` run generate --prerender" www-data
cp -r "${front_directory}/.output/public" /var/www/html cp -r "${front_directory}/.output/public" /var/www/html