mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-11-18 03:25:16 +00:00
Compare commits
15 Commits
MickLesk-p
...
MickLesk-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2f61af129 | ||
|
|
47cbdec252 | ||
|
|
7f28f12989 | ||
|
|
5cc11c27d2 | ||
|
|
a8ae43f59f | ||
|
|
122e475a4a | ||
|
|
45ae66d474 | ||
|
|
6e053f2c39 | ||
|
|
71cd680db9 | ||
|
|
c65c434f01 | ||
|
|
e7f2a2b377 | ||
|
|
da3846935a | ||
|
|
8522928e14 | ||
|
|
65b8180707 | ||
|
|
37cc47126e |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -10,15 +10,30 @@
|
|||||||
> [!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-11-16
|
||||||
|
|
||||||
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- Kimai: remove deprecated admin_lte section [@MickLesk](https://github.com/MickLesk) ([#9182](https://github.com/community-scripts/ProxmoxVE/pull/9182))
|
||||||
|
- healthchecks: bump python to 3.13 [@MickLesk](https://github.com/MickLesk) ([#9175](https://github.com/community-scripts/ProxmoxVE/pull/9175))
|
||||||
|
|
||||||
## 2025-11-15
|
## 2025-11-15
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
- #### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- privatebin: fix: syntax error in chmod command [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9169](https://github.com/community-scripts/ProxmoxVE/pull/9169))
|
||||||
|
- phpIPHAM: patch db and add fping [@MickLesk](https://github.com/MickLesk) ([#9177](https://github.com/community-scripts/ProxmoxVE/pull/9177))
|
||||||
- changedetection: fix: increase ressources [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9171](https://github.com/community-scripts/ProxmoxVE/pull/9171))
|
- changedetection: fix: increase ressources [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9171](https://github.com/community-scripts/ProxmoxVE/pull/9171))
|
||||||
- 2fauth: update composer command [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9168](https://github.com/community-scripts/ProxmoxVE/pull/9168))
|
- 2fauth: update composer command [@CrazyWolf13](https://github.com/CrazyWolf13) ([#9168](https://github.com/community-scripts/ProxmoxVE/pull/9168))
|
||||||
|
|
||||||
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- firefly: refactor update_script and add dataimporter update [@MickLesk](https://github.com/MickLesk) ([#9178](https://github.com/community-scripts/ProxmoxVE/pull/9178))
|
||||||
|
|
||||||
## 2025-11-14
|
## 2025-11-14
|
||||||
|
|
||||||
### 🆕 New Scripts
|
### 🆕 New Scripts
|
||||||
|
|||||||
@@ -28,40 +28,65 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if check_for_gh_release "firefly" "firefly-iii/firefly-iii"; then
|
|
||||||
msg_info "Stopping Apache2"
|
|
||||||
systemctl stop apache2
|
|
||||||
msg_ok "Stopped Apache2"
|
|
||||||
|
|
||||||
msg_info "Backing up data"
|
if check_for_gh_release "firefly" "firefly-iii/firefly-iii"; then
|
||||||
|
systemctl stop apache2
|
||||||
cp /opt/firefly/.env /opt/.env
|
cp /opt/firefly/.env /opt/.env
|
||||||
cp -r /opt/firefly/storage /opt/storage
|
cp -r /opt/firefly/storage /opt/storage
|
||||||
msg_ok "Backed up data"
|
|
||||||
|
if [[ -d /opt/firefly/dataimporter ]]; then
|
||||||
|
cp /opt/firefly/dataimporter/.env /opt/dataimporter.env
|
||||||
|
IMPORTER_INSTALLED=1
|
||||||
|
fi
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "firefly" "firefly-iii/firefly-iii" "prebuild" "latest" "/opt/firefly" "FireflyIII-*.zip"
|
fetch_and_deploy_gh_release "firefly" "firefly-iii/firefly-iii" "prebuild" "latest" "/opt/firefly" "FireflyIII-*.zip"
|
||||||
setup_composer
|
setup_composer
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
msg_info "Updating Firefly"
|
||||||
rm -rf /opt/firefly/storage
|
rm -rf /opt/firefly/storage
|
||||||
cp /opt/.env /opt/firefly/.env
|
|
||||||
cp -r /opt/storage /opt/firefly/storage
|
cp -r /opt/storage /opt/firefly/storage
|
||||||
|
cp /opt/.env /opt/firefly/.env
|
||||||
|
|
||||||
chown -R www-data:www-data /opt/firefly
|
chown -R www-data:www-data /opt/firefly
|
||||||
find /opt/firefly/storage -type d -exec chmod 775 {} \;
|
chmod -R 775 /opt/firefly/storage
|
||||||
find /opt/firefly/storage -type f -exec chmod 664 {} \;
|
mkdir -p /opt/firefly/storage/framework/cache/data
|
||||||
mkdir -p /opt/firefly/storage/framework/{cache/data,sessions,views}
|
mkdir -p /opt/firefly/storage/framework/sessions
|
||||||
$STD sudo -u www-data php /opt/firefly/artisan cache:clear
|
mkdir -p /opt/firefly/storage/framework/views
|
||||||
|
mkdir -p /opt/firefly/storage/logs
|
||||||
|
mkdir -p /opt/firefly/bootstrap/cache
|
||||||
|
chown -R www-data:www-data /opt/firefly/{storage,bootstrap/cache}
|
||||||
cd /opt/firefly
|
cd /opt/firefly
|
||||||
$STD php artisan migrate --seed --force
|
$STD runuser -u www-data -- composer install --no-dev --optimize-autoloader
|
||||||
$STD php artisan cache:clear
|
$STD runuser -u www-data -- composer dump-autoload -o
|
||||||
$STD php artisan view:clear
|
|
||||||
$STD php artisan firefly-iii:upgrade-database
|
|
||||||
$STD php artisan firefly-iii:laravel-passport-keys
|
|
||||||
msg_ok "Updated ${APP}"
|
|
||||||
|
|
||||||
msg_info "Starting Apache2"
|
$STD runuser -u www-data -- php artisan cache:clear
|
||||||
|
$STD runuser -u www-data -- php artisan config:clear
|
||||||
|
$STD runuser -u www-data -- php artisan route:clear
|
||||||
|
$STD runuser -u www-data -- php artisan view:clear
|
||||||
|
|
||||||
|
$STD runuser -u www-data -- php artisan migrate --seed --force
|
||||||
|
$STD runuser -u www-data -- php artisan firefly-iii:upgrade-database
|
||||||
|
$STD runuser -u www-data -- php artisan firefly-iii:laravel-passport-keys
|
||||||
|
|
||||||
|
$STD runuser -u www-data -- php artisan storage:link || true
|
||||||
|
$STD runuser -u www-data -- php artisan optimize
|
||||||
|
msg_ok "Updated Firefly"
|
||||||
|
|
||||||
|
if [[ "${IMPORTER_INSTALLED:-0}" -eq 1 ]]; then
|
||||||
|
msg_info "Updating Firefly Importer"
|
||||||
|
IMPORTER_RELEASE=$(curl -fsSL https://api.github.com/repos/firefly-iii/data-importer/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')
|
||||||
|
rm -rf /opt/firefly/dataimporter
|
||||||
|
mkdir -p /opt/firefly/dataimporter
|
||||||
|
curl -fsSL "https://github.com/firefly-iii/data-importer/releases/download/v${IMPORTER_RELEASE}/DataImporter-v${IMPORTER_RELEASE}.tar.gz" -o "/opt/DataImporter.tar.gz"
|
||||||
|
tar -xzf /opt/DataImporter.tar.gz -C /opt/firefly/dataimporter
|
||||||
|
if [[ -f /opt/dataimporter.env ]]; then
|
||||||
|
cp /opt/dataimporter.env /opt/firefly/dataimporter/.env
|
||||||
|
fi
|
||||||
|
chown -R www-data:www-data /opt/firefly/dataimporter
|
||||||
|
rm -f /opt/DataImporter.tar.gz
|
||||||
|
msg_ok "Updated Firefly Importer"
|
||||||
|
fi
|
||||||
systemctl start apache2
|
systemctl start apache2
|
||||||
msg_ok "Started Apache2"
|
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
|
|||||||
@@ -28,26 +28,42 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if check_for_gh_release "healthchecks" "healthchecks/healthchecks"; then
|
if check_for_gh_release "healthchecks" "healthchecks/healthchecks"; then
|
||||||
msg_info "Stopping Services"
|
msg_info "Stopping Services"
|
||||||
systemctl stop healthchecks
|
systemctl stop healthchecks
|
||||||
msg_ok "Stopped Services"
|
msg_ok "Stopped Services"
|
||||||
|
|
||||||
PYTHON_VERSION="3.12" setup_uv
|
msg_info "Backing up existing installation"
|
||||||
|
BACKUP="/opt/healthchecks-backup-$(date +%F-%H%M)"
|
||||||
|
cp -a /opt/healthchecks "$BACKUP"
|
||||||
|
msg_ok "Backup created at $BACKUP"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks"
|
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks"
|
||||||
|
|
||||||
msg_info "Updating healthchecks"
|
|
||||||
cd /opt/healthchecks
|
cd /opt/healthchecks
|
||||||
mkdir -p /opt/healthchecks/static-collected/
|
if [[ -d venv ]]; then
|
||||||
$STD uv pip install wheel gunicorn -r requirements.txt --system
|
rm -rf venv
|
||||||
$STD uv run -- python manage.py makemigrations
|
fi
|
||||||
$STD uv run -- python manage.py migrate --noinput
|
msg_info "Recreating Python venv"
|
||||||
$STD uv run -- python manage.py collectstatic --noinput
|
$STD python3 -m venv venv
|
||||||
$STD uv run -- python manage.py compress
|
$STD source venv/bin/activate
|
||||||
msg_ok "Updated healthchecks"
|
$STD pip install --upgrade pip wheel
|
||||||
|
msg_ok "Created venv"
|
||||||
|
|
||||||
|
msg_info "Installing requirements"
|
||||||
|
$STD pip install gunicorn -r requirements.txt
|
||||||
|
msg_ok "Installed requirements"
|
||||||
|
|
||||||
|
msg_info "Running Django migrations"
|
||||||
|
$STD python manage.py migrate --noinput
|
||||||
|
$STD python manage.py collectstatic --noinput
|
||||||
|
$STD python manage.py compress
|
||||||
|
msg_ok "Completed Django migrations and static build"
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
systemctl start healthchecks
|
systemctl start healthchecks
|
||||||
systemctl restart caddy
|
systemctl reload caddy
|
||||||
msg_ok "Started Services"
|
msg_ok "Started Services"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ function update_script() {
|
|||||||
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
|
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
|
||||||
rm -rf "$BACKUP_DIR"
|
rm -rf "$BACKUP_DIR"
|
||||||
cd /opt/kimai
|
cd /opt/kimai
|
||||||
|
sed -i '/^admin_lte:/,/^[^[:space:]]/d' config/local.yaml
|
||||||
$STD composer install --no-dev --optimize-autoloader
|
$STD composer install --no-dev --optimize-autoloader
|
||||||
$STD bin/console kimai:update
|
$STD bin/console kimai:update
|
||||||
msg_ok "Updated Kimai"
|
msg_ok "Updated Kimai"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ function update_script() {
|
|||||||
mkdir -p /opt/privatebin/data
|
mkdir -p /opt/privatebin/data
|
||||||
mv /tmp/privatebin_conf.bak /opt/privatebin/cfg/conf.php
|
mv /tmp/privatebin_conf.bak /opt/privatebin/cfg/conf.php
|
||||||
chown -R www-data:www-data /opt/privatebin
|
chown -R www-data:www-data /opt/privatebin
|
||||||
chmod -R 0755 /opt/privatebin/data}
|
chmod -R 0755 /opt/privatebin/data
|
||||||
systemctl reload nginx php8.2-fpm
|
systemctl reload nginx php8.2-fpm
|
||||||
msg_ok "Configured ${APP}"
|
msg_ok "Configured ${APP}"
|
||||||
msg_ok "Updated successfully!"
|
msg_ok "Updated successfully!"
|
||||||
|
|||||||
@@ -1,4 +1,34 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"name": "paperless-ngx/paperless-ngx",
|
||||||
|
"version": "v2.19.6",
|
||||||
|
"date": "2025-11-15T22:56:45Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "seerr-team/seerr",
|
||||||
|
"version": "preview-test-fix-subscriptions",
|
||||||
|
"date": "2025-11-15T20:51:48Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "BerriAI/litellm",
|
||||||
|
"version": "v1.79.3-stable",
|
||||||
|
"date": "2025-11-15T20:28:05Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "jenkinsci/jenkins",
|
||||||
|
"version": "jenkins-2.528.2",
|
||||||
|
"date": "2025-11-15T20:15:39Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bunkerity/bunkerweb",
|
||||||
|
"version": "v1.6.5",
|
||||||
|
"date": "2025-10-06T15:25:17Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "karakeep-app/karakeep",
|
||||||
|
"version": "android/v1.8.2-2",
|
||||||
|
"date": "2025-11-15T13:18:41Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "Jackett/Jackett",
|
"name": "Jackett/Jackett",
|
||||||
"version": "v0.24.311",
|
"version": "v0.24.311",
|
||||||
@@ -9,11 +39,6 @@
|
|||||||
"version": "4.10.1",
|
"version": "4.10.1",
|
||||||
"date": "2025-11-15T04:36:48Z"
|
"date": "2025-11-15T04:36:48Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "karakeep-app/karakeep",
|
|
||||||
"version": "android/v1.8.2-1",
|
|
||||||
"date": "2025-11-15T00:50:02Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "jeedom/core",
|
"name": "jeedom/core",
|
||||||
"version": "4.4.20",
|
"version": "4.4.20",
|
||||||
@@ -174,11 +199,6 @@
|
|||||||
"version": "v0.62.18",
|
"version": "v0.62.18",
|
||||||
"date": "2025-11-13T19:49:21Z"
|
"date": "2025-11-13T19:49:21Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "BerriAI/litellm",
|
|
||||||
"version": "v1.79.1-stable-patch-1",
|
|
||||||
"date": "2025-11-13T17:47:31Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "fuma-nama/fumadocs",
|
"name": "fuma-nama/fumadocs",
|
||||||
"version": "fumadocs-openapi@10.0.6",
|
"version": "fumadocs-openapi@10.0.6",
|
||||||
@@ -249,11 +269,6 @@
|
|||||||
"version": "v11.7.0",
|
"version": "v11.7.0",
|
||||||
"date": "2025-11-12T14:09:36Z"
|
"date": "2025-11-12T14:09:36Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "jenkinsci/jenkins",
|
|
||||||
"version": "jenkins-2.528.2",
|
|
||||||
"date": "2025-11-12T13:18:13Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "cockpit-project/cockpit",
|
"name": "cockpit-project/cockpit",
|
||||||
"version": "351",
|
"version": "351",
|
||||||
@@ -319,11 +334,6 @@
|
|||||||
"version": "v4.4.6",
|
"version": "v4.4.6",
|
||||||
"date": "2025-11-11T14:59:23Z"
|
"date": "2025-11-11T14:59:23Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "seerr-team/seerr",
|
|
||||||
"version": "preview-test-fix-subscriptions",
|
|
||||||
"date": "2025-11-11T14:38:10Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "CrazyWolf13/web-check",
|
"name": "CrazyWolf13/web-check",
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
@@ -489,11 +499,6 @@
|
|||||||
"version": "v0.6.36",
|
"version": "v0.6.36",
|
||||||
"date": "2025-11-06T21:45:33Z"
|
"date": "2025-11-06T21:45:33Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "paperless-ngx/paperless-ngx",
|
|
||||||
"version": "v2.19.5",
|
|
||||||
"date": "2025-11-06T20:20:13Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "HabitRPG/habitica",
|
"name": "HabitRPG/habitica",
|
||||||
"version": "v5.41.6",
|
"version": "v5.41.6",
|
||||||
@@ -539,11 +544,6 @@
|
|||||||
"version": "v2025-11-05",
|
"version": "v2025-11-05",
|
||||||
"date": "2025-11-05T18:08:26Z"
|
"date": "2025-11-05T18:08:26Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "bunkerity/bunkerweb",
|
|
||||||
"version": "v1.6.5",
|
|
||||||
"date": "2025-10-06T15:25:17Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "javedh-dev/tracktor",
|
"name": "javedh-dev/tracktor",
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#!/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)
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
@@ -16,43 +15,44 @@ update_os
|
|||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt install -y \
|
$STD apt install -y \
|
||||||
gcc \
|
gcc \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
python3-venv \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
caddy
|
caddy
|
||||||
|
|
||||||
|
mkdir -p ~/.config/pip
|
||||||
|
cat > ~/.config/pip/pip.conf << EOF
|
||||||
|
[global]
|
||||||
|
break-system-packages = true
|
||||||
|
EOF
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PYTHON_VERSION="3.12" setup_uv
|
|
||||||
PG_VERSION=16 setup_postgresql
|
PG_VERSION=16 setup_postgresql
|
||||||
|
PG_DB_NAME="healthchecks_db" PG_DB_USER="hc_user" PG_DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13) setup_postgresql_db
|
||||||
|
|
||||||
msg_info "Setup Database"
|
msg_info "Setup Keys (Admin / Secret)"
|
||||||
DB_NAME=healthchecks_db
|
|
||||||
DB_USER=hc_user
|
|
||||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
|
||||||
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
|
SECRET_KEY="$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | cut -c1-32)"
|
||||||
ADMIN_EMAIL="admin@helper-scripts.local"
|
ADMIN_EMAIL="admin@helper-scripts.local"
|
||||||
ADMIN_PASSWORD="$DB_PASS"
|
ADMIN_PASSWORD="$DB_PASS"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
|
||||||
{
|
{
|
||||||
echo "healthchecks-Credentials"
|
|
||||||
echo "healthchecks Database User: $DB_USER"
|
|
||||||
echo "healthchecks Database Password: $DB_PASS"
|
|
||||||
echo "healthchecks Database Name: $DB_NAME"
|
|
||||||
echo "healthchecks Admin Email: $ADMIN_EMAIL"
|
echo "healthchecks Admin Email: $ADMIN_EMAIL"
|
||||||
echo "healthchecks Admin Password: $ADMIN_PASSWORD"
|
echo "healthchecks Admin Password: $ADMIN_PASSWORD"
|
||||||
} >>~/healthchecks.creds
|
} >>~/healthchecks.creds
|
||||||
msg_ok "Set up Database"
|
msg_ok "Set up Keys"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks"
|
fetch_and_deploy_gh_release "healthchecks" "healthchecks/healthchecks"
|
||||||
|
|
||||||
msg_info "Setup healthchecks"
|
msg_info "Installing Healthchecks (venv)"
|
||||||
cd /opt/healthchecks
|
cd /opt/healthchecks
|
||||||
mkdir -p /opt/healthchecks/static-collected/
|
python3 -m venv venv
|
||||||
$STD uv pip install wheel gunicorn -r requirements.txt --system
|
source venv/bin/activate
|
||||||
|
|
||||||
|
$STD pip install --upgrade pip wheel
|
||||||
|
$STD pip install gunicorn -r requirements.txt
|
||||||
|
msg_ok "Installed Python packages"
|
||||||
|
|
||||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||||
cat <<EOF >/opt/healthchecks/hc/local_settings.py
|
cat <<EOF >/opt/healthchecks/hc/local_settings.py
|
||||||
@@ -83,18 +83,19 @@ DATABASES = {
|
|||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
$STD uv run -- python manage.py makemigrations
|
msg_info "Running Django setup"
|
||||||
$STD uv run -- python manage.py migrate --noinput
|
$STD python manage.py makemigrations
|
||||||
$STD uv run -- python manage.py collectstatic --noinput
|
$STD python manage.py migrate --noinput
|
||||||
$STD uv run -- python manage.py compress
|
$STD python manage.py collectstatic --noinput
|
||||||
|
$STD python manage.py compress
|
||||||
|
|
||||||
cat <<EOF | $STD uv run -- python manage.py shell
|
python <<EOF
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
if not User.objects.filter(email="${ADMIN_EMAIL}").exists():
|
if not User.objects.filter(email="${ADMIN_EMAIL}").exists():
|
||||||
User.objects.create_superuser("${ADMIN_EMAIL}", "${ADMIN_EMAIL}", "${ADMIN_PASSWORD}")
|
User.objects.create_superuser("${ADMIN_EMAIL}", "${ADMIN_EMAIL}", "${ADMIN_PASSWORD}")
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Installed healthchecks"
|
msg_ok "Configured Django"
|
||||||
|
|
||||||
msg_info "Configuring Caddy"
|
msg_info "Configuring Caddy"
|
||||||
cat <<EOF >/etc/caddy/Caddyfile
|
cat <<EOF >/etc/caddy/Caddyfile
|
||||||
@@ -108,7 +109,7 @@ ${LOCAL_IP} {
|
|||||||
EOF
|
EOF
|
||||||
msg_ok "Configured Caddy"
|
msg_ok "Configured Caddy"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating systemd service"
|
||||||
cat <<EOF >/etc/systemd/system/healthchecks.service
|
cat <<EOF >/etc/systemd/system/healthchecks.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Healthchecks Service
|
Description=Healthchecks Service
|
||||||
@@ -116,12 +117,13 @@ After=network.target postgresql.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/opt/healthchecks/
|
WorkingDirectory=/opt/healthchecks/
|
||||||
ExecStart=/usr/local/bin/uv run -- gunicorn hc.wsgi:application --bind 127.0.0.1:8000
|
ExecStart=/opt/healthchecks/venv/bin/gunicorn hc.wsgi:application --bind 127.0.0.1:8000
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
systemctl enable -q --now healthchecks caddy
|
systemctl enable -q --now healthchecks caddy
|
||||||
systemctl reload caddy
|
systemctl reload caddy
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|||||||
@@ -71,9 +71,6 @@ kimai:
|
|||||||
begin: 15
|
begin: 15
|
||||||
end: 15
|
end: 15
|
||||||
|
|
||||||
admin_lte:
|
|
||||||
options:
|
|
||||||
default_avatar: build/apple-touch-icon.png
|
|
||||||
EOF
|
EOF
|
||||||
msg_ok "Installed Kimai"
|
msg_ok "Installed Kimai"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user