mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
Silence peanut installation and update service configuration
This commit is contained in:
parent
ac7997c117
commit
579012ae30
2 changed files with 12 additions and 11 deletions
|
@ -82,4 +82,5 @@ pct set $CTID -cores 1
|
||||||
msg_ok "Set Container to Normal Resources"
|
msg_ok "Set Container to Normal Resources"
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
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"
|
||||||
|
|
|
@ -23,7 +23,6 @@ $STD apt-get install -y gpg
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Node.js"
|
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
|
mkdir -p /etc/apt/keyrings
|
||||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
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
|
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
|
$STD apt-get install -y nodejs
|
||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
|
msg_info "Installing NUT"
|
||||||
|
$STD apt-get install -y nut-client
|
||||||
|
msg_ok "Installed NUT"
|
||||||
|
|
||||||
msg_info "Installing Peanut"
|
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)}')
|
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
|
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
|
tar -xzf peanut.tar.gz -C /opt/peanut --strip-components 1
|
||||||
rm peanut.tar.gz
|
rm peanut.tar.gz
|
||||||
cd /opt/peanut
|
cd /opt/peanut
|
||||||
npm install -g pnpm
|
$STD npm install -g pnpm
|
||||||
pnpm i
|
$STD pnpm i
|
||||||
#pnpm run build
|
$STD npm run build
|
||||||
#pnpm run build:local
|
cp -r .next/static .next/standalone/.next/
|
||||||
npm run build && cp -r .next/static .next/standalone/.next/
|
|
||||||
#pnpm run start:local
|
|
||||||
node .next/standalone/server.js
|
|
||||||
msg_ok "Installed Peanut"
|
msg_ok "Installed Peanut"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
@ -61,9 +61,9 @@ Environment="NODE_ENV=production"
|
||||||
Environment="NUT_HOST=localhost"
|
Environment="NUT_HOST=localhost"
|
||||||
Environment="NUT_PORT=3493"
|
Environment="NUT_PORT=3493"
|
||||||
Environment="WEB_HOST=0.0.0.0"
|
Environment="WEB_HOST=0.0.0.0"
|
||||||
Environment="WEB_PORT=8080"
|
Environment="WEB_PORT=3000"
|
||||||
WorkingDirectory=/opt/peanut
|
WorkingDirectory=/opt/peanut
|
||||||
ExecStart=/opt/peanut/peanut
|
ExecStart=node /opt/peanut/.next/standalone/server.js
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue