mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-15 11:43:31 +01:00
Compare commits
17 Commits
update-and
...
github-act
| Author | SHA1 | Date | |
|---|---|---|---|
| 9edb7c16ab | |||
| 09134d94dd | |||
| 33103ad256 | |||
| fd75da89c4 | |||
| ee49576f3a | |||
| e651c14f76 | |||
| 1fc5c031cc | |||
| 35793051a1 | |||
| 9a6a0379a6 | |||
| 4fab369a5b | |||
| f977f6c987 | |||
| 2524dd1af7 | |||
| dfcaa70647 | |||
| 7b911403a3 | |||
| 1a96ed2221 | |||
| b180694d46 | |||
| f807ec748d |
1
.github/pull_request_template.md
generated
vendored
1
.github/pull_request_template.md
generated
vendored
@ -3,6 +3,7 @@ PRs without prior testing will be closed. -->
|
|||||||
|
|
||||||
## ✍️ Description
|
## ✍️ Description
|
||||||
|
|
||||||
|
|
||||||
## 🔗 Related Issue
|
## 🔗 Related Issue
|
||||||
|
|
||||||
Fixes #
|
Fixes #
|
||||||
|
|||||||
32
CHANGELOG.md
32
CHANGELOG.md
@ -10,8 +10,40 @@
|
|||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
|
||||||
|
|
||||||
|
## 2025-12-15
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- Refactor: Heimdall Dashboard [@tremor021](https://github.com/tremor021) ([#9959](https://github.com/community-scripts/ProxmoxVE/pull/9959))
|
||||||
|
|
||||||
|
### 💾 Core
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- core: load app defaults before applying base_settings / fix composer cleanup after install/update [@MickLesk](https://github.com/MickLesk) ([#9965](https://github.com/community-scripts/ProxmoxVE/pull/9965))
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
|
||||||
|
- README; add project statistics / formatting [@MickLesk](https://github.com/MickLesk) ([#9967](https://github.com/community-scripts/ProxmoxVE/pull/9967))
|
||||||
|
|
||||||
## 2025-12-14
|
## 2025-12-14
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- SonarQube: Fix database variables [@tremor021](https://github.com/tremor021) ([#9946](https://github.com/community-scripts/ProxmoxVE/pull/9946))
|
||||||
|
|
||||||
|
- #### 💥 Breaking Changes
|
||||||
|
|
||||||
|
- refactor: homarr [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9948](https://github.com/community-scripts/ProxmoxVE/pull/9948))
|
||||||
|
|
||||||
|
### 🌐 Website
|
||||||
|
|
||||||
|
- Update dependencies and remove unused files [@BramSuurdje](https://github.com/BramSuurdje) ([#9945](https://github.com/community-scripts/ProxmoxVE/pull/9945))
|
||||||
|
|
||||||
## 2025-12-13
|
## 2025-12-13
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|||||||
33
README.md
33
README.md
@ -30,8 +30,8 @@
|
|||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
> **Simplify your Proxmox VE setup with community-driven automation scripts**
|
**Simplify your Proxmox VE setup with community-driven automation scripts**
|
||||||
> Originally created by tteck, now maintained and expanded by the community
|
Originally created by tteck, now maintained and expanded by the community
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -239,17 +239,34 @@ This project is maintained by volunteers in memory of tteck. Your support helps
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📈 Project Growth
|
## 📈 Project Statistics
|
||||||
|
<p align="center">
|
||||||
|
<img
|
||||||
|
src="https://repobeats.axiom.co/api/embed/57edde03e00f88d739bdb5b844ff7d07dd079375.svg"
|
||||||
|
alt="Repobeats analytics"
|
||||||
|
width="650"
|
||||||
|
/>
|
||||||
|
</p>
|
||||||
|
|
||||||
<div align="center">
|
<p align="center">
|
||||||
<a href="https://star-history.com/#community-scripts/ProxmoxVE&Date">
|
<a href="https://star-history.com/#community-scripts/ProxmoxVE&Date">
|
||||||
<picture>
|
<picture>
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=community-scripts/ProxmoxVE&type=Date&theme=dark" />
|
<source
|
||||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=community-scripts/ProxmoxVE&type=Date" />
|
media="(prefers-color-scheme: dark)"
|
||||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=community-scripts/ProxmoxVE&type=Date" />
|
srcset="https://api.star-history.com/svg?repos=community-scripts/ProxmoxVE&type=Date&theme=dark"
|
||||||
|
/>
|
||||||
|
<source
|
||||||
|
media="(prefers-color-scheme: light)"
|
||||||
|
srcset="https://api.star-history.com/svg?repos=community-scripts/ProxmoxVE&type=Date"
|
||||||
|
/>
|
||||||
|
<img
|
||||||
|
alt="Star History Chart"
|
||||||
|
src="https://api.star-history.com/svg?repos=community-scripts/ProxmoxVE&type=Date"
|
||||||
|
width="650"
|
||||||
|
/>
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</p>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@ var_cpu="${var_cpu:-1}"
|
|||||||
var_ram="${var_ram:-512}"
|
var_ram="${var_ram:-512}"
|
||||||
var_disk="${var_disk:-2}"
|
var_disk="${var_disk:-2}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
@ -27,45 +27,45 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
RELEASE=$(curl -fsSL "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
|
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
if check_for_gh_release "Heimdall" "linuxserver/Heimdall"; then
|
||||||
msg_info "Stopping Service"
|
msg_info "Stopping Service"
|
||||||
systemctl stop heimdall
|
systemctl stop heimdall
|
||||||
sleep 1
|
sleep 1
|
||||||
msg_ok "Stopped Service"
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
msg_info "Backing up Data"
|
msg_info "Backing up Data"
|
||||||
cp -R /opt/Heimdall/database database-backup
|
cp -R /opt/Heimdall/database database-backup
|
||||||
cp -R /opt/Heimdall/public public-backup
|
cp -R /opt/Heimdall/public public-backup
|
||||||
sleep 1
|
sleep 1
|
||||||
msg_ok "Backed up Data"
|
msg_ok "Backed up Data"
|
||||||
msg_info "Updating Heimdall Dashboard to ${RELEASE}"
|
|
||||||
curl -fsSL "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -o $(basename "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz")
|
setup_composer
|
||||||
tar xzf "${RELEASE}".tar.gz
|
fetch_and_deploy_gh_release "Heimdall" "linuxserver/Heimdall" "tarball"
|
||||||
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
cp -R Heimdall-"${VER}"/* /opt/Heimdall
|
msg_info "Updating Heimdall-Dashboard"
|
||||||
cd /opt/Heimdall
|
cd /opt/Heimdall
|
||||||
$STD apt-get install -y composer
|
|
||||||
export COMPOSER_ALLOW_SUPERUSER=1
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
$STD composer dump-autoload
|
$STD composer dump-autoload
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
msg_ok "Updated Heimdall-Dashboard"
|
||||||
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
|
|
||||||
msg_info "Restoring Data"
|
msg_info "Restoring Data"
|
||||||
cd ~
|
cd ~
|
||||||
cp -R database-backup/* /opt/Heimdall/database
|
cp -R database-backup/* /opt/Heimdall/database
|
||||||
cp -R public-backup/* /opt/Heimdall/public
|
cp -R public-backup/* /opt/Heimdall/public
|
||||||
sleep 1
|
sleep 1
|
||||||
msg_ok "Restored Data"
|
msg_ok "Restored Data"
|
||||||
msg_info "Cleanup"
|
|
||||||
rm -rf {"${RELEASE}".tar.gz,Heimdall-"${VER}",public-backup,database-backup,Heimdall}
|
msg_info "Cleaning Up"
|
||||||
|
rm -rf {public-backup,database-backup}
|
||||||
sleep 1
|
sleep 1
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned Up"
|
||||||
|
|
||||||
msg_info "Starting Service"
|
msg_info "Starting Service"
|
||||||
systemctl start heimdall.service
|
systemctl start heimdall.service
|
||||||
sleep 2
|
sleep 2
|
||||||
msg_ok "Started Service"
|
msg_ok "Started Service"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
145
ct/homarr.sh
145
ct/homarr.sh
@ -1,21 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: CrazyWolf13
|
# Author: MickLesk (CanbiZ) | Co-Author: CrazyWolf13
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://homarr.dev/
|
# Source: https://homarr.dev/
|
||||||
|
|
||||||
APP="homarr"
|
APP="homarr"
|
||||||
var_tags="${var_tags:-arr;dashboard}"
|
var_tags="${var_tags:-arr;dashboard}"
|
||||||
var_cpu="${var_cpu:-3}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-6144}"
|
var_ram="${var_ram:-1024}"
|
||||||
var_disk="${var_disk:-8}"
|
var_disk="${var_disk:-8}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|
||||||
variables
|
variables
|
||||||
color
|
color
|
||||||
catch_errors
|
catch_errors
|
||||||
@ -28,69 +27,33 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [[ -f /opt/homarr/database/db.sqlite ]]; then
|
|
||||||
msg_error "Old Homarr detected due to existing database file (/opt/homarr/database/db.sqlite)."
|
|
||||||
msg_error "Update not supported. Refer to:"
|
|
||||||
msg_error " - https://github.com/community-scripts/ProxmoxVE/discussions/1551"
|
|
||||||
msg_error " - https://homarr.dev/docs/getting-started/after-the-installation/#importing-a-zip-from-version-before-100"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [[ ! -f /opt/run_homarr.sh ]]; then
|
|
||||||
msg_info "Detected outdated and missing service files"
|
|
||||||
msg_error "Warning - The port of homarr changed from 3000 to 7575"
|
|
||||||
$STD apt-get install -y nginx gettext openssl gpg
|
|
||||||
sed -i '/^NODE_ENV=/d' /opt/homarr/.env && echo "NODE_ENV='production'" >>/opt/homarr/.env
|
|
||||||
sed -i '/^DB_DIALECT=/d' /opt/homarr/.env && echo "DB_DIALECT='sqlite'" >>/opt/homarr/.env
|
|
||||||
cat <<'EOF' >/opt/run_homarr.sh
|
|
||||||
#!/bin/bash
|
|
||||||
set -a
|
|
||||||
source /opt/homarr/.env
|
|
||||||
set +a
|
|
||||||
export DB_DIALECT='sqlite'
|
|
||||||
export AUTH_SECRET=$(openssl rand -base64 32)
|
|
||||||
export CRON_JOB_API_KEY=$(openssl rand -base64 32)
|
|
||||||
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
|
|
||||||
for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do
|
|
||||||
dirname=$(basename "$dir")
|
|
||||||
mkdir -p "/opt/homarr_db/migrations/$dirname"
|
|
||||||
cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
|
|
||||||
envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf
|
|
||||||
nginx -g 'daemon off;' &
|
|
||||||
redis-server /opt/homarr/packages/redis/redis.conf &
|
|
||||||
node apps/tasks/tasks.cjs &
|
|
||||||
node apps/websocket/wssServer.cjs &
|
|
||||||
node apps/nextjs/server.js & PID=$!
|
|
||||||
wait $PID
|
|
||||||
EOF
|
|
||||||
chmod +x /opt/run_homarr.sh
|
|
||||||
rm /etc/systemd/system/homarr.service
|
|
||||||
cat <<EOF >/etc/systemd/system/homarr.service
|
|
||||||
[Unit]
|
|
||||||
Description=Homarr Service
|
|
||||||
After=network.target
|
|
||||||
[Service]
|
|
||||||
Type=exec
|
|
||||||
WorkingDirectory=/opt/homarr
|
|
||||||
EnvironmentFile=-/opt/homarr/.env
|
|
||||||
ExecStart=/opt/run_homarr.sh
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
msg_ok "Updated Services"
|
|
||||||
systemctl daemon-reload
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "homarr" "homarr-labs/homarr"; then
|
if check_for_gh_release "homarr" "homarr-labs/homarr"; then
|
||||||
msg_info "Stopping Services (Patience)"
|
msg_info "Stopping Services (Patience)"
|
||||||
systemctl stop homarr
|
systemctl stop homarr
|
||||||
|
systemctl stop redis-server
|
||||||
msg_ok "Services Stopped"
|
msg_ok "Services Stopped"
|
||||||
|
|
||||||
msg_info "Backup Data"
|
if ! { grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr/.env 2>/dev/null || grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr.env 2>/dev/null; }; then
|
||||||
mkdir -p /opt/homarr-data-backup
|
msg_info "Fixing old structure"
|
||||||
cp /opt/homarr/.env /opt/homarr-data-backup/.env
|
# fix musl issues because homarr compiles on alpine not debian soure: https://github.com/alexander-akhmetov/python-telegram/issues/3
|
||||||
msg_ok "Backup Data"
|
$STD apt install -y musl-dev
|
||||||
|
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
|
||||||
|
cp /opt/homarr/.env /opt/homarr.env
|
||||||
|
echo "REDIS_IS_EXTERNAL='true'" >> /opt/homarr.env
|
||||||
|
sed -i 's|^ExecStart=.*|ExecStart=/opt/homarr/run.sh|' /etc/systemd/system/homarr.service
|
||||||
|
sed -i 's|^EnvironmentFile=.*|EnvironmentFile=-/opt/homarr.env|' /etc/systemd/system/homarr.service
|
||||||
|
chown -R redis:redis /appdata/redis
|
||||||
|
chmod 744 /appdata/redis
|
||||||
|
mkdir -p /etc/systemd/system/redis-server.service.d/
|
||||||
|
cat <<EOF >/etc/systemd/system/redis-server.service.d/override.conf
|
||||||
|
[Service]
|
||||||
|
ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis -/etc/redis
|
||||||
|
EOF
|
||||||
|
systemctl daemon-reload
|
||||||
|
rm /opt/run_homarr.sh
|
||||||
|
msg_ok "Fixed old structure"
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Updating Nodejs"
|
msg_info "Updating Nodejs"
|
||||||
$STD apt update
|
$STD apt update
|
||||||
@ -98,69 +61,21 @@ EOF
|
|||||||
msg_ok "Updated Nodejs"
|
msg_ok "Updated Nodejs"
|
||||||
|
|
||||||
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
|
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]')"
|
|
||||||
setup_nodejs
|
setup_nodejs
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-amd64.tar.gz"
|
||||||
|
|
||||||
rm -rf /opt/homarr
|
msg_info "Updating Homarr"
|
||||||
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr"
|
cp /opt/homarr/redis.conf /etc/redis/redis.conf
|
||||||
|
|
||||||
msg_info "Updating and rebuilding ${APP} (Patience)"
|
|
||||||
rm /opt/run_homarr.sh
|
|
||||||
cat <<'EOF' >/opt/run_homarr.sh
|
|
||||||
#!/bin/bash
|
|
||||||
set -a
|
|
||||||
source /opt/homarr/.env
|
|
||||||
set +a
|
|
||||||
export DB_DIALECT='sqlite'
|
|
||||||
export AUTH_SECRET=$(openssl rand -base64 32)
|
|
||||||
export CRON_JOB_API_KEY=$(openssl rand -base64 32)
|
|
||||||
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
|
|
||||||
for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do
|
|
||||||
dirname=$(basename "$dir")
|
|
||||||
mkdir -p "/opt/homarr_db/migrations/$dirname"
|
|
||||||
cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
|
|
||||||
envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf
|
|
||||||
nginx -g 'daemon off;' &
|
|
||||||
redis-server /opt/homarr/packages/redis/redis.conf &
|
|
||||||
node apps/tasks/tasks.cjs &
|
|
||||||
node apps/websocket/wssServer.cjs &
|
|
||||||
node apps/nextjs/server.js & PID=$!
|
|
||||||
wait $PID
|
|
||||||
EOF
|
|
||||||
chmod +x /opt/run_homarr.sh
|
|
||||||
mv /opt/homarr-data-backup/.env /opt/homarr/.env
|
|
||||||
cd /opt/homarr
|
|
||||||
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist
|
|
||||||
$STD pnpm build
|
|
||||||
cp /opt/homarr/apps/nextjs/next.config.ts .
|
|
||||||
cp /opt/homarr/apps/nextjs/package.json .
|
|
||||||
cp -r /opt/homarr/packages/db/migrations /opt/homarr_db/migrations
|
|
||||||
cp -r /opt/homarr/apps/nextjs/.next/standalone/* /opt/homarr
|
|
||||||
mkdir -p /appdata/redis
|
|
||||||
cp /opt/homarr/packages/redis/redis.conf /opt/homarr/redis.conf
|
|
||||||
rm /etc/nginx/nginx.conf
|
rm /etc/nginx/nginx.conf
|
||||||
mkdir -p /etc/nginx/templates
|
|
||||||
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
||||||
|
msg_ok "Updated Homarr"
|
||||||
mkdir -p /opt/homarr/apps/cli
|
|
||||||
cp /opt/homarr/packages/cli/cli.cjs /opt/homarr/apps/cli/cli.cjs
|
|
||||||
echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr
|
|
||||||
chmod +x /usr/bin/homarr
|
|
||||||
|
|
||||||
mkdir /opt/homarr/build
|
|
||||||
cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node
|
|
||||||
msg_ok "Updated ${APP}"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
|
chmod +x /opt/homarr/run.sh
|
||||||
systemctl start homarr
|
systemctl start homarr
|
||||||
|
systemctl start redis-server
|
||||||
msg_ok "Started Services"
|
msg_ok "Started Services"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
read -p "${TAB3}It's recommended to reboot the LXC after an update, would you like to reboot the LXC now ? (y/n): " choice
|
|
||||||
if [[ "$choice" =~ ^[Yy]$ ]]; then
|
|
||||||
reboot
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
"ram": 512,
|
"ram": 512,
|
||||||
"hdd": 2,
|
"hdd": 2,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "13"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
"type": "default",
|
"type": "default",
|
||||||
"script": "ct/homarr.sh",
|
"script": "ct/homarr.sh",
|
||||||
"resources": {
|
"resources": {
|
||||||
"cpu": 3,
|
"cpu": 2,
|
||||||
"ram": 6144,
|
"ram": 1024,
|
||||||
"hdd": 8,
|
"hdd": 8,
|
||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "13"
|
"version": "13"
|
||||||
|
|||||||
@ -1,4 +1,79 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "BerriAI/litellm",
|
||||||
|
"version": "v1.80.10.rc.2",
|
||||||
|
"date": "2025-12-14T22:47:12Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "nickheyer/discopanel",
|
||||||
|
"version": "v1.0.15",
|
||||||
|
"date": "2025-12-14T21:49:36Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "AlexxIT/go2rtc",
|
||||||
|
"version": "v1.9.13",
|
||||||
|
"date": "2025-12-14T20:18:28Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "netvisor-io/netvisor",
|
||||||
|
"version": "v0.12.0",
|
||||||
|
"date": "2025-12-14T19:20:29Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "alexta69/metube",
|
||||||
|
"version": "2025.12.14",
|
||||||
|
"date": "2025-12-14T18:24:33Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "firefly-iii/firefly-iii",
|
||||||
|
"version": "v6.4.10",
|
||||||
|
"date": "2025-12-14T18:13:34Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "openhab/openhab-core",
|
||||||
|
"version": "5.1.0.M4",
|
||||||
|
"date": "2025-12-14T18:12:04Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "rcourtman/Pulse",
|
||||||
|
"version": "v4.36.2",
|
||||||
|
"date": "2025-12-03T22:46:29Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Jackett/Jackett",
|
||||||
|
"version": "v0.24.452",
|
||||||
|
"date": "2025-12-14T15:50:44Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "semaphoreui/semaphore",
|
||||||
|
"version": "v2.17.0-beta24",
|
||||||
|
"date": "2025-12-14T14:04:23Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "blakeblackshear/frigate",
|
||||||
|
"version": "v0.14.1",
|
||||||
|
"date": "2024-08-29T22:32:51Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "docmost/docmost",
|
||||||
|
"version": "v0.24.1",
|
||||||
|
"date": "2025-12-14T13:49:16Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "laurent22/joplin",
|
||||||
|
"version": "server-v3.5.1",
|
||||||
|
"date": "2025-12-03T11:56:50Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "chrisbenincasa/tunarr",
|
||||||
|
"version": "v1.0.3",
|
||||||
|
"date": "2025-12-14T13:32:31Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "C4illin/ConvertX",
|
||||||
|
"version": "v0.16.1",
|
||||||
|
"date": "2025-12-14T13:21:05Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "globaleaks/globaleaks-whistleblowing-software",
|
"name": "globaleaks/globaleaks-whistleblowing-software",
|
||||||
"version": "v5.0.87",
|
"version": "v5.0.87",
|
||||||
@ -9,21 +84,11 @@
|
|||||||
"version": "2.223.0",
|
"version": "2.223.0",
|
||||||
"date": "2025-12-14T08:16:54Z"
|
"date": "2025-12-14T08:16:54Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "netvisor-io/netvisor",
|
|
||||||
"version": "v0.12.0",
|
|
||||||
"date": "2025-12-14T06:08:25Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "morpheus65535/bazarr",
|
"name": "morpheus65535/bazarr",
|
||||||
"version": "v1.5.3",
|
"version": "v1.5.3",
|
||||||
"date": "2025-09-20T12:12:33Z"
|
"date": "2025-09-20T12:12:33Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "Jackett/Jackett",
|
|
||||||
"version": "v0.24.448",
|
|
||||||
"date": "2025-12-14T05:55:44Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "release-argus/Argus",
|
"name": "release-argus/Argus",
|
||||||
"version": "0.28.1",
|
"version": "0.28.1",
|
||||||
@ -34,16 +99,6 @@
|
|||||||
"version": "1.3.12",
|
"version": "1.3.12",
|
||||||
"date": "2025-12-14T02:58:24Z"
|
"date": "2025-12-14T02:58:24Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "BerriAI/litellm",
|
|
||||||
"version": "v1.80.10.rc.1",
|
|
||||||
"date": "2025-12-14T02:32:50Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "nickheyer/discopanel",
|
|
||||||
"version": "v1.0.14",
|
|
||||||
"date": "2025-12-14T00:51:39Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "steveiliop56/tinyauth",
|
"name": "steveiliop56/tinyauth",
|
||||||
"version": "v4.1.0",
|
"version": "v4.1.0",
|
||||||
@ -104,11 +159,6 @@
|
|||||||
"version": "cli/v0.29.1",
|
"version": "cli/v0.29.1",
|
||||||
"date": "2025-12-13T13:55:51Z"
|
"date": "2025-12-13T13:55:51Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "chrisbenincasa/tunarr",
|
|
||||||
"version": "v1.0.2",
|
|
||||||
"date": "2025-12-13T13:34:22Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "fuma-nama/fumadocs",
|
"name": "fuma-nama/fumadocs",
|
||||||
"version": "fumadocs-openapi@10.1.4",
|
"version": "fumadocs-openapi@10.1.4",
|
||||||
@ -129,11 +179,6 @@
|
|||||||
"version": "v0.26.2",
|
"version": "v0.26.2",
|
||||||
"date": "2025-12-13T07:48:09Z"
|
"date": "2025-12-13T07:48:09Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "firefly-iii/firefly-iii",
|
|
||||||
"version": "v6.4.9",
|
|
||||||
"date": "2025-11-28T20:36:20Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "mealie-recipes/mealie",
|
"name": "mealie-recipes/mealie",
|
||||||
"version": "v3.7.0",
|
"version": "v3.7.0",
|
||||||
@ -179,11 +224,6 @@
|
|||||||
"version": "2025.12.3",
|
"version": "2025.12.3",
|
||||||
"date": "2025-12-12T18:12:39Z"
|
"date": "2025-12-12T18:12:39Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "docmost/docmost",
|
|
||||||
"version": "v0.24.0",
|
|
||||||
"date": "2025-12-12T18:05:49Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "booklore-app/booklore",
|
"name": "booklore-app/booklore",
|
||||||
"version": "v1.14.1",
|
"version": "v1.14.1",
|
||||||
@ -454,11 +494,6 @@
|
|||||||
"version": "v1.4.7",
|
"version": "v1.4.7",
|
||||||
"date": "2025-12-09T11:44:49Z"
|
"date": "2025-12-09T11:44:49Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "alexta69/metube",
|
|
||||||
"version": "2025.12.09",
|
|
||||||
"date": "2025-12-09T00:16:11Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "Dispatcharr/Dispatcharr",
|
"name": "Dispatcharr/Dispatcharr",
|
||||||
"version": "v0.14.0",
|
"version": "v0.14.0",
|
||||||
@ -529,11 +564,6 @@
|
|||||||
"version": "2.7.1",
|
"version": "2.7.1",
|
||||||
"date": "2025-12-06T20:30:34Z"
|
"date": "2025-12-06T20:30:34Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "blakeblackshear/frigate",
|
|
||||||
"version": "v0.14.1",
|
|
||||||
"date": "2024-08-29T22:32:51Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "navidrome/navidrome",
|
"name": "navidrome/navidrome",
|
||||||
"version": "v0.59.0",
|
"version": "v0.59.0",
|
||||||
@ -544,11 +574,6 @@
|
|||||||
"version": "v5.19.2",
|
"version": "v5.19.2",
|
||||||
"date": "2025-12-06T14:56:53Z"
|
"date": "2025-12-06T14:56:53Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "openhab/openhab-core",
|
|
||||||
"version": "4.3.9",
|
|
||||||
"date": "2025-12-06T14:31:36Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "prometheus/blackbox_exporter",
|
"name": "prometheus/blackbox_exporter",
|
||||||
"version": "v0.28.0",
|
"version": "v0.28.0",
|
||||||
@ -639,11 +664,6 @@
|
|||||||
"version": "11.0.4",
|
"version": "11.0.4",
|
||||||
"date": "2025-12-04T09:26:37Z"
|
"date": "2025-12-04T09:26:37Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "rcourtman/Pulse",
|
|
||||||
"version": "v4.36.2",
|
|
||||||
"date": "2025-12-03T22:46:29Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "danielbrendel/hortusfox-web",
|
"name": "danielbrendel/hortusfox-web",
|
||||||
"version": "v5.5",
|
"version": "v5.5",
|
||||||
@ -659,11 +679,6 @@
|
|||||||
"version": "6.2.10",
|
"version": "6.2.10",
|
||||||
"date": "2025-12-03T13:58:32Z"
|
"date": "2025-12-03T13:58:32Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "laurent22/joplin",
|
|
||||||
"version": "server-v3.5.1",
|
|
||||||
"date": "2025-12-03T11:56:50Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "SigNoz/signoz",
|
"name": "SigNoz/signoz",
|
||||||
"version": "v0.104.0",
|
"version": "v0.104.0",
|
||||||
@ -734,11 +749,6 @@
|
|||||||
"version": "3000.7.0",
|
"version": "3000.7.0",
|
||||||
"date": "2025-12-01T23:29:47Z"
|
"date": "2025-12-01T23:29:47Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "C4illin/ConvertX",
|
|
||||||
"version": "v0.16.0",
|
|
||||||
"date": "2025-12-01T21:35:19Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "slskd/slskd",
|
"name": "slskd/slskd",
|
||||||
"version": "0.24.1",
|
"version": "0.24.1",
|
||||||
@ -904,11 +914,6 @@
|
|||||||
"version": "2.3.0",
|
"version": "2.3.0",
|
||||||
"date": "2025-11-24T09:48:32Z"
|
"date": "2025-11-24T09:48:32Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "semaphoreui/semaphore",
|
|
||||||
"version": "v2.17.0-beta22",
|
|
||||||
"date": "2025-11-24T06:07:49Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "webmin/webmin",
|
"name": "webmin/webmin",
|
||||||
"version": "2.610",
|
"version": "2.610",
|
||||||
@ -1084,11 +1089,6 @@
|
|||||||
"version": "v2.15.0",
|
"version": "v2.15.0",
|
||||||
"date": "2025-11-16T18:53:49Z"
|
"date": "2025-11-16T18:53:49Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "AlexxIT/go2rtc",
|
|
||||||
"version": "v1.9.12",
|
|
||||||
"date": "2025-11-16T16:14:55Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "outline/outline",
|
"name": "outline/outline",
|
||||||
"version": "v1.1.0",
|
"version": "v1.1.0",
|
||||||
|
|||||||
@ -14,27 +14,22 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y apt-transport-https
|
$STD apt install -y apt-transport-https
|
||||||
$STD apt-get install -y composer
|
|
||||||
$STD apt-get install -y php8.2-{bz2,curl,sqlite3,zip,xml}
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
RELEASE=$(curl -fsSL "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
|
PHP_VERSION="8.4" PHP_MODULE="bz2,sqlite3" PHP_FPM="YES" setup_php
|
||||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
setup_composer
|
||||||
msg_info "Installing Heimdall Dashboard ${RELEASE}"
|
fetch_and_deploy_gh_release "Heimdall" "linuxserver/Heimdall" "tarball"
|
||||||
curl -fsSL "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" -o "${RELEASE}".tar.gz
|
|
||||||
tar xzf "${RELEASE}".tar.gz
|
msg_info "Setting up Heimdall-Dashboard"
|
||||||
VER=$(curl -fsSL https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
rm -rf "${RELEASE}".tar.gz
|
|
||||||
mv Heimdall-"${VER}" /opt/Heimdall
|
|
||||||
cd /opt/Heimdall
|
cd /opt/Heimdall
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
$STD php artisan key:generate
|
$STD php artisan key:generate
|
||||||
msg_ok "Installed Heimdall Dashboard ${RELEASE}"
|
msg_ok "Setup Heimdall-Dashboard"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/heimdall.service"
|
cat <<EOF >/etc/systemd/system/heimdall.service
|
||||||
echo "[Unit]
|
[Unit]
|
||||||
Description=Heimdall
|
Description=Heimdall
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
@ -44,14 +39,16 @@ RestartSec=5
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/Heimdall
|
WorkingDirectory=/opt/Heimdall
|
||||||
ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0
|
ExecStart=/usr/bin/php artisan serve --port 7990 --host 0.0.0.0
|
||||||
TimeoutStopSec=30
|
TimeoutStopSec=30
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >$service_path
|
WantedBy=multi-user.target"
|
||||||
|
EOF
|
||||||
systemctl enable -q --now heimdall
|
systemctl enable -q --now heimdall
|
||||||
cd /opt/Heimdall
|
cd /opt/Heimdall
|
||||||
COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
$STD composer dump-autoload
|
||||||
systemctl restart heimdall.service
|
systemctl restart heimdall.service
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: MickLesk (Canbiz)
|
# Author: MickLesk (CanbiZ) | Co-Author: CrazyWolf13
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/homarr-labs/homarr
|
# Source: https://github.com/homarr-labs/homarr
|
||||||
|
|
||||||
@ -16,28 +16,24 @@ update_os
|
|||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
redis-server \
|
redis-server \
|
||||||
ca-certificates \
|
|
||||||
make \
|
|
||||||
g++ \
|
|
||||||
build-essential \
|
|
||||||
nginx \
|
nginx \
|
||||||
gettext \
|
gettext \
|
||||||
jq \
|
openssl \
|
||||||
openssl
|
musl-dev
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
NODE_VERSION=$(curl -s https://raw.githubusercontent.com/homarr-labs/homarr/dev/package.json | jq -r '.engines.node | split(">=")[1] | split(".")[0]')
|
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]')"
|
|
||||||
setup_nodejs
|
setup_nodejs
|
||||||
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr"
|
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-amd64.tar.gz"
|
||||||
|
|
||||||
msg_info "Installing Homarr (Patience)"
|
msg_info "Installing Homarr"
|
||||||
cd /opt
|
# fix musl issues because homarr compiles on alpine not debian soure: https://github.com/alexander-akhmetov/python-telegram/issues/3
|
||||||
|
ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1
|
||||||
mkdir -p /opt/homarr_db
|
mkdir -p /opt/homarr_db
|
||||||
touch /opt/homarr_db/db.sqlite
|
touch /opt/homarr_db/db.sqlite
|
||||||
SECRET_ENCRYPTION_KEY="$(openssl rand -hex 32)"
|
SECRET_ENCRYPTION_KEY="$(openssl rand -hex 32)"
|
||||||
cd /opt/homarr
|
cd /opt/homarr
|
||||||
cat <<EOF >/opt/homarr/.env
|
cat <<EOF >/opt/homarr.env
|
||||||
DB_DRIVER='better-sqlite3'
|
DB_DRIVER='better-sqlite3'
|
||||||
DB_DIALECT='sqlite'
|
DB_DIALECT='sqlite'
|
||||||
SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}'
|
SECRET_ENCRYPTION_KEY='${SECRET_ENCRYPTION_KEY}'
|
||||||
@ -45,54 +41,28 @@ DB_URL='/opt/homarr_db/db.sqlite'
|
|||||||
TURBO_TELEMETRY_DISABLED=1
|
TURBO_TELEMETRY_DISABLED=1
|
||||||
AUTH_PROVIDERS='credentials'
|
AUTH_PROVIDERS='credentials'
|
||||||
NODE_ENV='production'
|
NODE_ENV='production'
|
||||||
|
REDIS_IS_EXTERNAL='true'
|
||||||
EOF
|
EOF
|
||||||
$STD pnpm install --recursive --frozen-lockfile --shamefully-hoist
|
|
||||||
$STD pnpm build
|
|
||||||
msg_ok "Installed Homarr"
|
msg_ok "Installed Homarr"
|
||||||
|
|
||||||
msg_info "Copying build and config files"
|
msg_info "Copying config files"
|
||||||
cp /opt/homarr/apps/nextjs/next.config.ts .
|
|
||||||
cp /opt/homarr/apps/nextjs/package.json .
|
|
||||||
cp -r /opt/homarr/packages/db/migrations /opt/homarr_db/migrations
|
|
||||||
cp -r /opt/homarr/apps/nextjs/.next/standalone/* /opt/homarr
|
|
||||||
mkdir -p /appdata/redis
|
mkdir -p /appdata/redis
|
||||||
cp /opt/homarr/packages/redis/redis.conf /opt/homarr/redis.conf
|
chown -R redis:redis /appdata/redis
|
||||||
mkdir -p /etc/nginx/templates
|
chmod 744 /appdata/redis
|
||||||
|
cp /opt/homarr/redis.conf /etc/redis/redis.conf
|
||||||
rm /etc/nginx/nginx.conf
|
rm /etc/nginx/nginx.conf
|
||||||
|
mkdir -p /etc/nginx/templates
|
||||||
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf
|
||||||
mkdir -p /opt/homarr/apps/cli
|
|
||||||
cp /opt/homarr/packages/cli/cli.cjs /opt/homarr/apps/cli/cli.cjs
|
|
||||||
echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr
|
echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr
|
||||||
chmod +x /usr/bin/homarr
|
chmod +x /usr/bin/homarr
|
||||||
mkdir /opt/homarr/build
|
msg_ok "Copied config files"
|
||||||
cp ./node_modules/better-sqlite3/build/Release/better_sqlite3.node ./build/better_sqlite3.node
|
|
||||||
msg_ok "Finished copying"
|
|
||||||
|
|
||||||
msg_info "Creating Services"
|
msg_info "Creating Services"
|
||||||
cat <<'EOF' >/opt/run_homarr.sh
|
mkdir -p /etc/systemd/system/redis-server.service.d/
|
||||||
#!/bin/bash
|
cat <<EOF >/etc/systemd/system/redis-server.service.d/override.conf
|
||||||
set -a
|
[Service]
|
||||||
source /opt/homarr/.env
|
ReadWritePaths=-/appdata/redis -/var/lib/redis -/var/log/redis -/var/run/redis -/etc/redis
|
||||||
set +a
|
|
||||||
export DB_DIALECT='sqlite'
|
|
||||||
export AUTH_SECRET=$(openssl rand -base64 32)
|
|
||||||
export CRON_JOB_API_KEY=$(openssl rand -base64 32)
|
|
||||||
node /opt/homarr_db/migrations/$DB_DIALECT/migrate.cjs /opt/homarr_db/migrations/$DB_DIALECT
|
|
||||||
for dir in $(find /opt/homarr_db/migrations/migrations -mindepth 1 -maxdepth 1 -type d); do
|
|
||||||
dirname=$(basename "$dir")
|
|
||||||
mkdir -p "/opt/homarr_db/migrations/$dirname"
|
|
||||||
cp -r "$dir"/* "/opt/homarr_db/migrations/$dirname/" 2>/dev/null || true
|
|
||||||
done
|
|
||||||
export HOSTNAME=$(ip route get 1.1.1.1 | grep -oP 'src \K[^ ]+')
|
|
||||||
envsubst '${HOSTNAME}' < /etc/nginx/templates/nginx.conf > /etc/nginx/nginx.conf
|
|
||||||
nginx -g 'daemon off;' &
|
|
||||||
redis-server /opt/homarr/packages/redis/redis.conf &
|
|
||||||
node apps/tasks/tasks.cjs &
|
|
||||||
node apps/websocket/wssServer.cjs &
|
|
||||||
node apps/nextjs/server.js & PID=$!
|
|
||||||
wait $PID
|
|
||||||
EOF
|
EOF
|
||||||
chmod +x /opt/run_homarr.sh
|
|
||||||
cat <<EOF >/etc/systemd/system/homarr.service
|
cat <<EOF >/etc/systemd/system/homarr.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Homarr Service
|
Description=Homarr Service
|
||||||
@ -101,14 +71,17 @@ After=network.target
|
|||||||
[Service]
|
[Service]
|
||||||
Type=exec
|
Type=exec
|
||||||
WorkingDirectory=/opt/homarr
|
WorkingDirectory=/opt/homarr
|
||||||
EnvironmentFile=-/opt/homarr/.env
|
EnvironmentFile=-/opt/homarr.env
|
||||||
ExecStart=/opt/run_homarr.sh
|
ExecStart=/opt/homarr/run.sh
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
chmod +x /opt/homarr/run.sh
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable -q --now redis-server && sleep 5
|
||||||
systemctl enable -q --now homarr
|
systemctl enable -q --now homarr
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
@ -27,9 +27,9 @@ chown -R sonarqube:sonarqube /opt/sonarqube
|
|||||||
chmod -R 755 /opt/sonarqube
|
chmod -R 755 /opt/sonarqube
|
||||||
mkdir -p /opt/sonarqube/conf
|
mkdir -p /opt/sonarqube/conf
|
||||||
cat <<EOF >/opt/sonarqube/conf/sonar.properties
|
cat <<EOF >/opt/sonarqube/conf/sonar.properties
|
||||||
sonar.jdbc.username=${DB_USER}
|
sonar.jdbc.username=${PG_DB_USER}
|
||||||
sonar.jdbc.password=${DB_PASS}
|
sonar.jdbc.password=${PG_DB_PASS}
|
||||||
sonar.jdbc.url=jdbc:postgresql://localhost/${DB_NAME}
|
sonar.jdbc.url=jdbc:postgresql://localhost/${PG_DB_NAME}
|
||||||
sonar.web.host=0.0.0.0
|
sonar.web.host=0.0.0.0
|
||||||
sonar.web.port=9000
|
sonar.web.port=9000
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@ -445,9 +445,11 @@ base_settings() {
|
|||||||
# - Safe parser for KEY=VALUE lines from vars files
|
# - Safe parser for KEY=VALUE lines from vars files
|
||||||
# - Used by default_var_settings and app defaults loading
|
# - Used by default_var_settings and app defaults loading
|
||||||
# - Only loads whitelisted var_* keys
|
# - Only loads whitelisted var_* keys
|
||||||
|
# - Optional force parameter to override existing values (for app defaults)
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
load_vars_file() {
|
load_vars_file() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
|
local force="${2:-no}" # If "yes", override existing variables
|
||||||
[ -f "$file" ] || return 0
|
[ -f "$file" ] || return 0
|
||||||
msg_info "Loading defaults from ${file}"
|
msg_info "Loading defaults from ${file}"
|
||||||
|
|
||||||
@ -485,8 +487,12 @@ load_vars_file() {
|
|||||||
var_val="${BASH_REMATCH[1]}"
|
var_val="${BASH_REMATCH[1]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set only if not already exported
|
# Set variable: force mode overrides existing, otherwise only set if empty
|
||||||
[[ -z "${!var_key+x}" ]] && export "${var_key}=${var_val}"
|
if [[ "$force" == "yes" ]]; then
|
||||||
|
export "${var_key}=${var_val}"
|
||||||
|
else
|
||||||
|
[[ -z "${!var_key+x}" ]] && export "${var_key}=${var_val}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done <"$file"
|
done <"$file"
|
||||||
msg_ok "Loaded ${file}"
|
msg_ok "Loaded ${file}"
|
||||||
@ -2148,8 +2154,8 @@ install_script() {
|
|||||||
header_info
|
header_info
|
||||||
echo -e "${DEFAULT}${BOLD}${BL}Using App Defaults for ${APP} on node $PVEHOST_NAME${CL}"
|
echo -e "${DEFAULT}${BOLD}${BL}Using App Defaults for ${APP} on node $PVEHOST_NAME${CL}"
|
||||||
METHOD="appdefaults"
|
METHOD="appdefaults"
|
||||||
|
load_vars_file "$(get_app_defaults_path)" "yes" # Force override script defaults
|
||||||
base_settings
|
base_settings
|
||||||
load_vars_file "$(get_app_defaults_path)"
|
|
||||||
echo_default
|
echo_default
|
||||||
defaults_target="$(get_app_defaults_path)"
|
defaults_target="$(get_app_defaults_path)"
|
||||||
break
|
break
|
||||||
|
|||||||
@ -828,7 +828,7 @@ cleanup_lxc() {
|
|||||||
# Ruby gem
|
# Ruby gem
|
||||||
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
|
if command -v gem &>/dev/null; then $STD gem cleanup || true; fi
|
||||||
# Composer (PHP)
|
# Composer (PHP)
|
||||||
if command -v composer &>/dev/null; then $STD composer clear-cache || true; fi
|
if command -v composer &>/dev/null; then COMPOSER_ALLOW_SUPERUSER=1 && $STD composer clear-cache || true; fi
|
||||||
|
|
||||||
if command -v journalctl &>/dev/null; then
|
if command -v journalctl &>/dev/null; then
|
||||||
$STD journalctl --vacuum-time=10m || true
|
$STD journalctl --vacuum-time=10m || true
|
||||||
|
|||||||
Reference in New Issue
Block a user