Silence peanut installation and update service configuration

This commit is contained in:
Rémi Bédard-Couture 2024-06-12 22:50:55 -04:00
parent ac7997c117
commit 579012ae30
2 changed files with 12 additions and 11 deletions

View file

@ -82,4 +82,5 @@ pct set $CTID -cores 1
msg_ok "Set Container to Normal Resources"
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:8080${CL} \n"
${BL}http://${IP}:3000${CL} \n
${YW}Don't forget to update the NUT configuration!${CL} \n"

View file

@ -23,7 +23,6 @@ $STD apt-get install -y gpg
msg_ok "Installed Dependencies"
msg_info "Installing Node.js"
#curl -fsSL https://deb.nodesource.com/setup_21.x | bash - && apt-get install -y nodejs
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
@ -31,6 +30,10 @@ $STD apt-get update
$STD apt-get install -y nodejs
msg_ok "Installed Node.js"
msg_info "Installing NUT"
$STD apt-get install -y nut-client
msg_ok "Installed NUT"
msg_info "Installing Peanut"
RELEASE_URL=$(curl -s https://api.github.com/repos/Brandawg93/PeaNUT/releases/latest | grep "tarball_url" | awk '{print substr($2, 2, length($2)-3)}')
wget -qO peanut.tar.gz $RELEASE_URL
@ -38,13 +41,10 @@ mkdir -p /opt/peanut
tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1
rm peanut.tar.gz
cd /opt/peanut
npm install -g pnpm
pnpm i
#pnpm run build
#pnpm run build:local
npm run build && cp -r .next/static .next/standalone/.next/
#pnpm run start:local
node .next/standalone/server.js
$STD npm install -g pnpm
$STD pnpm i
$STD npm run build
cp -r .next/static .next/standalone/.next/
msg_ok "Installed Peanut"
msg_info "Creating Service"
@ -61,9 +61,9 @@ Environment="NODE_ENV=production"
Environment="NUT_HOST=localhost"
Environment="NUT_PORT=3493"
Environment="WEB_HOST=0.0.0.0"
Environment="WEB_PORT=8080"
Environment="WEB_PORT=3000"
WorkingDirectory=/opt/peanut
ExecStart=/opt/peanut/peanut
ExecStart=node /opt/peanut/.next/standalone/server.js
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target