Update homarr.sh (#4974)
This commit is contained in:
parent
4e53abbd48
commit
ec573be7e0
19
ct/homarr.sh
19
ct/homarr.sh
@ -92,6 +92,19 @@ EOF
|
|||||||
cp /opt/homarr/.env /opt/homarr-data-backup/.env
|
cp /opt/homarr/.env /opt/homarr-data-backup/.env
|
||||||
msg_ok "Backup Data"
|
msg_ok "Backup Data"
|
||||||
|
|
||||||
|
msg_info "Updating Nodejs"
|
||||||
|
$STD apt update
|
||||||
|
$STD apt upgrade nodejs -y
|
||||||
|
msg_ok "Updated Nodejs"
|
||||||
|
|
||||||
|
$STD command -v jq || $STD apt-get update && $STD apt-get install -y jq
|
||||||
|
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
|
||||||
|
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')"
|
||||||
|
install_node_and_modules
|
||||||
|
|
||||||
|
rm -rf /opt/homarr
|
||||||
|
fetch_and_deploy_gh_release "homarr-labs/homarr"
|
||||||
|
|
||||||
msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)"
|
msg_info "Updating and rebuilding ${APP} to v${RELEASE} (Patience)"
|
||||||
rm /opt/run_homarr.sh
|
rm /opt/run_homarr.sh
|
||||||
cat <<'EOF' >/opt/run_homarr.sh
|
cat <<'EOF' >/opt/run_homarr.sh
|
||||||
@ -117,12 +130,6 @@ node apps/nextjs/server.js & PID=$!
|
|||||||
wait $PID
|
wait $PID
|
||||||
EOF
|
EOF
|
||||||
chmod +x /opt/run_homarr.sh
|
chmod +x /opt/run_homarr.sh
|
||||||
$STD command -v jq || $STD apt-get update && $STD apt-get install -y jq
|
|
||||||
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
|
|
||||||
NODE_MODULE="pnpm@$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.packageManager | split("@")[1]')"
|
|
||||||
install_node_and_modules
|
|
||||||
rm -rf /opt/homarr
|
|
||||||
fetch_and_deploy_gh_release "homarr-labs/homarr"
|
|
||||||
mv /opt/homarr-data-backup/.env /opt/homarr/.env
|
mv /opt/homarr-data-backup/.env /opt/homarr/.env
|
||||||
cd /opt/homarr
|
cd /opt/homarr
|
||||||
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist
|
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user