mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-20 14:31:18 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 07c50a092e |
@@ -483,19 +483,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
## 2026-06-20
|
|
||||||
|
|
||||||
### 🆕 New Scripts
|
|
||||||
|
|
||||||
- Apache-Airflow ([#15228](https://github.com/community-scripts/ProxmoxVE/pull/15228))
|
|
||||||
- Plane ([#15227](https://github.com/community-scripts/ProxmoxVE/pull/15227))
|
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
|
||||||
|
|
||||||
- #### 🐞 Bug Fixes
|
|
||||||
|
|
||||||
- Nginxproxymanager: repair broken certbot pip before update [@MickLesk](https://github.com/MickLesk) ([#15224](https://github.com/community-scripts/ProxmoxVE/pull/15224))
|
|
||||||
|
|
||||||
## 2026-06-19
|
## 2026-06-19
|
||||||
|
|
||||||
### 🚀 Updated Scripts
|
### 🚀 Updated Scripts
|
||||||
@@ -508,7 +495,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
- #### ✨ New Features
|
- #### ✨ New Features
|
||||||
|
|
||||||
- [arm64] Port scripts between garage-hortusfox to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15207](https://github.com/community-scripts/ProxmoxVE/pull/15207))
|
|
||||||
- [arm64] Port scripts titled between A-F to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15181](https://github.com/community-scripts/ProxmoxVE/pull/15181))
|
- [arm64] Port scripts titled between A-F to support arm64 [@asylumexp](https://github.com/asylumexp) ([#15181](https://github.com/community-scripts/ProxmoxVE/pull/15181))
|
||||||
|
|
||||||
### 📂 Github
|
### 📂 Github
|
||||||
|
|||||||
@@ -1,75 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/apache/airflow
|
|
||||||
|
|
||||||
APP="Apache-Airflow"
|
|
||||||
var_tags="${var_tags:-workflow;scheduler;automation}"
|
|
||||||
var_cpu="${var_cpu:-2}"
|
|
||||||
var_ram="${var_ram:-4096}"
|
|
||||||
var_disk="${var_disk:-16}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-no}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -d /opt/airflow ]]; then
|
|
||||||
msg_error "No ${APP} Installation Found!"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
INSTALLED=$(cat ~/.airflow 2>/dev/null || echo "0")
|
|
||||||
LATEST=$(curl -fsSL "https://pypi.org/pypi/apache-airflow/json" | jq -r '.info.version')
|
|
||||||
|
|
||||||
if [[ "$INSTALLED" == "$LATEST" ]]; then
|
|
||||||
msg_ok "Already on the latest version (${LATEST})"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_info "Stopping Services"
|
|
||||||
systemctl stop airflow-api-server airflow-scheduler airflow-dag-processor airflow-triggerer
|
|
||||||
msg_ok "Stopped Services"
|
|
||||||
|
|
||||||
create_backup /opt/airflow/.env
|
|
||||||
|
|
||||||
msg_info "Updating Apache Airflow to ${LATEST}"
|
|
||||||
$STD uv pip install --python /opt/airflow/.venv/bin/python \
|
|
||||||
"apache-airflow[postgres,fab]==${LATEST}" \
|
|
||||||
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${LATEST}/constraints-3.12.txt"
|
|
||||||
echo "${LATEST}" >~/.airflow
|
|
||||||
msg_ok "Updated Apache Airflow to ${LATEST}"
|
|
||||||
|
|
||||||
restore_backup
|
|
||||||
|
|
||||||
msg_info "Running Database Migrations"
|
|
||||||
set -a && source /opt/airflow/.env && set +a
|
|
||||||
$STD /opt/airflow/.venv/bin/airflow db migrate
|
|
||||||
msg_ok "Ran Database Migrations"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
|
||||||
systemctl start airflow-api-server airflow-scheduler airflow-dag-processor airflow-triggerer
|
|
||||||
msg_ok "Started Services"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8080${CL}"
|
|
||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-1024}"
|
|||||||
var_disk="${var_disk:-5}"
|
var_disk="${var_disk:-5}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ 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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ 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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ var_ram="${var_ram:-2048}"
|
|||||||
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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
var_nesting="${var_nesting:-1}"
|
var_nesting="${var_nesting:-1}"
|
||||||
var_keyctl="${var_keyctl:-1}"
|
var_keyctl="${var_keyctl:-1}"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ 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:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-2048}"
|
|||||||
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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
var_tun="${var_tun:-yes}"
|
var_tun="${var_tun:-yes}"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-2048}"
|
|||||||
var_disk="${var_disk:-4}"
|
var_disk="${var_disk:-4}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
var_gpu="${var_gpu:-yes}"
|
var_gpu="${var_gpu:-yes}"
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ 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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-512}"
|
|||||||
var_disk="${var_disk:-4}"
|
var_disk="${var_disk:-4}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ 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:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-4096}"
|
|||||||
var_disk="${var_disk:-20}"
|
var_disk="${var_disk:-20}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
___ __ ___ _ ______
|
|
||||||
/ | ____ ____ ______/ /_ ___ / | (_)____/ __/ /___ _ __
|
|
||||||
/ /| | / __ \/ __ `/ ___/ __ \/ _ \______/ /| | / / ___/ /_/ / __ \ | /| / /
|
|
||||||
/ ___ |/ /_/ / /_/ / /__/ / / / __/_____/ ___ |/ / / / __/ / /_/ / |/ |/ /
|
|
||||||
/_/ |_/ .___/\__,_/\___/_/ /_/\___/ /_/ |_/_/_/ /_/ /_/\____/|__/|__/
|
|
||||||
/_/
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
____ __
|
|
||||||
/ __ \/ /___ _____ ___
|
|
||||||
/ /_/ / / __ `/ __ \/ _ \
|
|
||||||
/ ____/ / /_/ / / / / __/
|
|
||||||
/_/ /_/\__,_/_/ /_/\___/
|
|
||||||
|
|
||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-2048}"
|
|||||||
var_disk="${var_disk:-5}"
|
var_disk="${var_disk:-5}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-4096}"
|
|||||||
var_disk="${var_disk:-20}"
|
var_disk="${var_disk:-20}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ 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:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-2048}"
|
|||||||
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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+2
-2
@@ -6,13 +6,13 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
|
|||||||
# Source: https://www.home-assistant.io/
|
# Source: https://www.home-assistant.io/
|
||||||
|
|
||||||
APP="Home Assistant"
|
APP="Home Assistant"
|
||||||
var_tags="${var_tags:-automation;smarthome;docker}"
|
var_tags="${var_tags:-automation;smarthome}"
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-2048}"
|
||||||
var_disk="${var_disk:-16}"
|
var_disk="${var_disk:-16}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-1024}"
|
|||||||
var_disk="${var_disk:-4}"
|
var_disk="${var_disk:-4}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ var_ram="${var_ram:-2048}"
|
|||||||
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_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ var_ram="${var_ram:-1024}"
|
|||||||
var_disk="${var_disk:-5}"
|
var_disk="${var_disk:-5}"
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
var_version="${var_version:-13}"
|
var_version="${var_version:-13}"
|
||||||
var_arm64="${var_arm64:-yes}"
|
var_arm64="${var_arm64:-no}"
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
|
|||||||
@@ -108,13 +108,8 @@ EOF
|
|||||||
cd /root
|
cd /root
|
||||||
if [ -d /opt/certbot ]; then
|
if [ -d /opt/certbot ]; then
|
||||||
msg_info "Updating Certbot"
|
msg_info "Updating Certbot"
|
||||||
CERTBOT_PYTHON="/opt/certbot/bin/python"
|
$STD /opt/certbot/bin/pip install --upgrade pip setuptools wheel
|
||||||
if ! "$CERTBOT_PYTHON" -m pip --version &>/dev/null; then
|
$STD /opt/certbot/bin/pip install --upgrade certbot certbot-dns-cloudflare
|
||||||
msg_info "Repairing Certbot pip"
|
|
||||||
$STD "$CERTBOT_PYTHON" -m ensurepip --upgrade
|
|
||||||
fi
|
|
||||||
$STD "$CERTBOT_PYTHON" -m pip install --upgrade pip setuptools wheel
|
|
||||||
$STD "$CERTBOT_PYTHON" -m pip install --upgrade certbot certbot-dns-cloudflare
|
|
||||||
msg_ok "Updated Certbot"
|
msg_ok "Updated Certbot"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
-88
@@ -1,88 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: onionrings29
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://plane.so | GitHub: https://github.com/makeplane/plane
|
|
||||||
|
|
||||||
APP="Plane"
|
|
||||||
var_tags="${var_tags:-project-management}"
|
|
||||||
var_cpu="${var_cpu:-4}"
|
|
||||||
var_ram="${var_ram:-6144}"
|
|
||||||
var_disk="${var_disk:-8}"
|
|
||||||
var_os="${var_os:-debian}"
|
|
||||||
var_version="${var_version:-13}"
|
|
||||||
var_arm64="${var_arm64:-no}"
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
|
||||||
|
|
||||||
header_info "$APP"
|
|
||||||
variables
|
|
||||||
color
|
|
||||||
catch_errors
|
|
||||||
|
|
||||||
function update_script() {
|
|
||||||
header_info
|
|
||||||
check_container_storage
|
|
||||||
check_container_resources
|
|
||||||
|
|
||||||
if [[ ! -d /opt/plane ]]; then
|
|
||||||
msg_error "No Plane Installation Found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if check_for_gh_release "plane" "makeplane/plane"; then
|
|
||||||
msg_info "Stopping Services"
|
|
||||||
systemctl stop plane-api plane-worker plane-beat plane-live plane-space
|
|
||||||
msg_ok "Stopped Services"
|
|
||||||
|
|
||||||
create_backup /opt/plane/.env \
|
|
||||||
/opt/plane/apps/admin/.env \
|
|
||||||
/opt/plane/apps/api/.env \
|
|
||||||
/opt/plane/apps/space/.env \
|
|
||||||
/opt/plane/apps/web/.env
|
|
||||||
|
|
||||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "plane" "makeplane/plane" "tarball"
|
|
||||||
|
|
||||||
restore_backup
|
|
||||||
|
|
||||||
msg_info "Rebuilding Frontend (Patience)"
|
|
||||||
cd /opt/plane
|
|
||||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
|
||||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
||||||
$STD corepack enable pnpm
|
|
||||||
$STD pnpm install --frozen-lockfile
|
|
||||||
$STD pnpm turbo run build --filter=web --filter=admin --filter=space --filter=live
|
|
||||||
msg_ok "Rebuilt Frontend"
|
|
||||||
|
|
||||||
msg_info "Updating Python Dependencies"
|
|
||||||
cd /opt/plane/apps/api
|
|
||||||
export VIRTUAL_ENV=/opt/plane-venv
|
|
||||||
$STD uv pip install --upgrade -r requirements/production.txt
|
|
||||||
msg_ok "Updated Python Dependencies"
|
|
||||||
|
|
||||||
msg_info "Running Migrations"
|
|
||||||
cd /opt/plane/apps/api
|
|
||||||
set -a
|
|
||||||
source /opt/plane/apps/api/.env
|
|
||||||
set +a
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py migrate
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py collectstatic --noinput
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py configure_instance
|
|
||||||
msg_ok "Ran Migrations"
|
|
||||||
|
|
||||||
msg_info "Starting Services"
|
|
||||||
systemctl start plane-api plane-worker plane-beat plane-live plane-space
|
|
||||||
msg_ok "Started Services"
|
|
||||||
msg_ok "Updated successfully!"
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed successfully!\n"
|
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
|
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: MickLesk (CanbiZ)
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/apache/airflow
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
build-essential \
|
|
||||||
libpq-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libffi-dev \
|
|
||||||
python3-dev
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
UV_PYTHON="3.12" setup_uv
|
|
||||||
PG_VERSION="16" setup_postgresql
|
|
||||||
PG_DB_NAME="airflow" PG_DB_USER="airflow" setup_postgresql_db
|
|
||||||
|
|
||||||
msg_info "Installing Apache Airflow"
|
|
||||||
AIRFLOW_VERSION="3.2.1"
|
|
||||||
mkdir -p /opt/airflow/{dags,logs,plugins}
|
|
||||||
cd /opt/airflow
|
|
||||||
$STD uv venv --python 3.12
|
|
||||||
$STD uv pip install --python /opt/airflow/.venv/bin/python \
|
|
||||||
"apache-airflow[postgres,fab]==${AIRFLOW_VERSION}" \
|
|
||||||
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-3.12.txt"
|
|
||||||
echo "${AIRFLOW_VERSION}" >~/.airflow
|
|
||||||
msg_ok "Installed Apache Airflow"
|
|
||||||
|
|
||||||
msg_info "Configuring Application"
|
|
||||||
FERNET_KEY=$(/opt/airflow/.venv/bin/python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())")
|
|
||||||
SECRET_KEY=$(openssl rand -hex 32)
|
|
||||||
ADMIN_PASS=$(openssl rand -base64 12 | tr -dc 'a-zA-Z0-9' | cut -c1-12)
|
|
||||||
cat <<EOF >/opt/airflow/.env
|
|
||||||
AIRFLOW_HOME=/opt/airflow
|
|
||||||
AIRFLOW__DATABASE__SQL_ALCHEMY_CONN=postgresql+psycopg2://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAME}
|
|
||||||
AIRFLOW__CORE__EXECUTOR=LocalExecutor
|
|
||||||
AIRFLOW__CORE__FERNET_KEY=${FERNET_KEY}
|
|
||||||
AIRFLOW__CORE__DAGS_FOLDER=/opt/airflow/dags
|
|
||||||
AIRFLOW__CORE__LOAD_EXAMPLES=false
|
|
||||||
AIRFLOW__CORE__AUTH_MANAGER=airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager
|
|
||||||
AIRFLOW__API__AUTH_BACKENDS=airflow.api.auth.backend.basic_auth,airflow.api.auth.backend.session
|
|
||||||
AIRFLOW__WEBSERVER__SECRET_KEY=${SECRET_KEY}
|
|
||||||
AIRFLOW__WEBSERVER__BASE_URL=http://${LOCAL_IP}:8080
|
|
||||||
AIRFLOW_ADMIN_PASSWORD=${ADMIN_PASS}
|
|
||||||
EOF
|
|
||||||
set -a && source /opt/airflow/.env && set +a
|
|
||||||
$STD /opt/airflow/.venv/bin/airflow db migrate
|
|
||||||
$STD /opt/airflow/.venv/bin/airflow users create \
|
|
||||||
--username admin \
|
|
||||||
--firstname Admin \
|
|
||||||
--lastname User \
|
|
||||||
--role Admin \
|
|
||||||
--email admin@example.com \
|
|
||||||
--password "${ADMIN_PASS}"
|
|
||||||
msg_ok "Configured Application"
|
|
||||||
|
|
||||||
msg_info "Creating Services"
|
|
||||||
cat <<EOF >/etc/systemd/system/airflow-api-server.service
|
|
||||||
[Unit]
|
|
||||||
Description=Apache Airflow API Server
|
|
||||||
After=network.target postgresql.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
EnvironmentFile=/opt/airflow/.env
|
|
||||||
ExecStart=/opt/airflow/.venv/bin/airflow api-server --port 8080
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/airflow-scheduler.service
|
|
||||||
[Unit]
|
|
||||||
Description=Apache Airflow Scheduler
|
|
||||||
After=network.target postgresql.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
EnvironmentFile=/opt/airflow/.env
|
|
||||||
ExecStart=/opt/airflow/.venv/bin/airflow scheduler
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/airflow-dag-processor.service
|
|
||||||
[Unit]
|
|
||||||
Description=Apache Airflow DAG Processor
|
|
||||||
After=network.target postgresql.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
EnvironmentFile=/opt/airflow/.env
|
|
||||||
ExecStart=/opt/airflow/.venv/bin/airflow dag-processor
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/airflow-triggerer.service
|
|
||||||
[Unit]
|
|
||||||
Description=Apache Airflow Triggerer
|
|
||||||
After=network.target postgresql.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
User=root
|
|
||||||
EnvironmentFile=/opt/airflow/.env
|
|
||||||
ExecStart=/opt/airflow/.venv/bin/airflow triggerer
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now airflow-api-server airflow-scheduler airflow-dag-processor airflow-triggerer
|
|
||||||
msg_ok "Created Services"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -13,13 +13,31 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
DOCKER_LATEST_VERSION=$(get_latest_github_release "moby/moby")
|
||||||
|
PORTAINER_LATEST_VERSION=$(get_latest_github_release "portainer/portainer")
|
||||||
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_github_release "portainer/agent")
|
PORTAINER_AGENT_LATEST_VERSION=$(get_latest_github_release "portainer/agent")
|
||||||
|
|
||||||
|
msg_info "Installing Docker $DOCKER_LATEST_VERSION (with Compose, Buildx)"
|
||||||
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||||
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||||
|
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
||||||
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
|
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
|
||||||
|
|
||||||
read -r -p "${TAB3}Would you like to add Portainer (UI)? <y/N> " prompt
|
read -r -p "${TAB3}Would you like to add Portainer (UI)? <y/N> " prompt
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
DOCKER_PORTAINER="true" setup_docker
|
msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
|
||||||
|
docker volume create portainer_data >/dev/null
|
||||||
|
$STD docker run -d \
|
||||||
|
-p 8000:8000 \
|
||||||
|
-p 9443:9443 \
|
||||||
|
--name=portainer \
|
||||||
|
--restart=always \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-v portainer_data:/data \
|
||||||
|
portainer/portainer-ce:latest
|
||||||
|
msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
|
||||||
else
|
else
|
||||||
setup_docker
|
|
||||||
read -r -p "${TAB3}Would you like to install the Portainer Agent (for remote management)? <y/N> " prompt_agent
|
read -r -p "${TAB3}Would you like to install the Portainer Agent (for remote management)? <y/N> " prompt_agent
|
||||||
if [[ ${prompt_agent,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt_agent,,} =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
msg_info "Installing Portainer Agent $PORTAINER_AGENT_LATEST_VERSION"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ update_os
|
|||||||
|
|
||||||
msg_info "Setup Garage"
|
msg_info "Setup Garage"
|
||||||
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
GITEA_RELEASE=$(curl -s https://api.github.com/repos/deuxfleurs-org/garage/tags | jq -r '.[0].name')
|
||||||
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/$(arch_resolve "x86_64" "aarch64")-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
curl -fsSL "https://garagehq.deuxfleurs.fr/_releases/${GITEA_RELEASE}/x86_64-unknown-linux-musl/garage" -o /usr/local/bin/garage
|
||||||
chmod +x /usr/local/bin/garage
|
chmod +x /usr/local/bin/garage
|
||||||
mkdir -p /var/lib/garage/{data,meta,snapshots}
|
mkdir -p /var/lib/garage/{data,meta,snapshots}
|
||||||
mkdir -p /etc/garage
|
mkdir -p /etc/garage
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ $STD apt install -y \
|
|||||||
sqlite3
|
sqlite3
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "gitea" "go-gitea/gitea" "singlefile" "latest" "/usr/local/bin" "gitea-*-linux-$(arch_resolve)"
|
fetch_and_deploy_gh_release "gitea" "go-gitea/gitea" "singlefile" "latest" "/usr/local/bin" "gitea-*-linux-amd64"
|
||||||
|
|
||||||
msg_info "Configuring Gitea"
|
msg_info "Configuring Gitea"
|
||||||
chmod +x /usr/local/bin/gitea
|
chmod +x /usr/local/bin/gitea
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ msg_info "Creating runner user (no sudo)"
|
|||||||
useradd -m -s /bin/bash runner
|
useradd -m -s /bin/bash runner
|
||||||
msg_ok "Runner user ready"
|
msg_ok "Runner user ready"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-$(arch_resolve "x64" "arm64")-*.tar.gz"
|
fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-x64-*.tar.gz"
|
||||||
|
|
||||||
msg_info "Setting ownership for runner user"
|
msg_info "Setting ownership for runner user"
|
||||||
chown -R runner:runner /opt/actions-runner
|
chown -R runner:runner /opt/actions-runner
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "glance" "glanceapp/glance" "prebuild" "latest" "/opt/glance" "glance-linux-$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "glance" "glanceapp/glance" "prebuild" "latest" "/opt/glance" "glance-linux-amd64.tar.gz"
|
||||||
|
|
||||||
msg_info "Configuring Glance"
|
msg_info "Configuring Glance"
|
||||||
mkdir -p /opt/glance_data
|
mkdir -p /opt/glance_data
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt install -y ffmpeg
|
$STD apt install -y ffmpeg
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "go2rtc" "AlexxIT/go2rtc" "singlefile" "latest" "/opt/go2rtc" "go2rtc_linux_$(arch_resolve)"
|
USE_ORIGINAL_FILENAME="true" fetch_and_deploy_gh_release "go2rtc" "AlexxIT/go2rtc" "singlefile" "latest" "/opt/go2rtc" "go2rtc_linux_amd64"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/go2rtc.service
|
cat <<EOF >/etc/systemd/system/go2rtc.service
|
||||||
@@ -30,7 +30,7 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/go2rtc
|
WorkingDirectory=/opt/go2rtc
|
||||||
ExecStart=/opt/go2rtc/go2rtc_linux_$(arch_resolve)
|
ExecStart=/opt/go2rtc/go2rtc_linux_amd64
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt install -y git
|
$STD apt install -y git
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "gogs" "gogs/gogs" "prebuild" "latest" "/opt/gogs" "gogs_*_linux_$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "gogs" "gogs/gogs" "prebuild" "latest" "/opt/gogs" "gogs_*_linux_amd64.tar.gz"
|
||||||
|
|
||||||
msg_info "Setting up Gogs"
|
msg_info "Setting up Gogs"
|
||||||
mkdir -p /opt/gogs/{custom/conf,data,log}
|
mkdir -p /opt/gogs/{custom/conf,data,log}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "gokapi" "Forceu/Gokapi" "prebuild" "latest" "/opt/gokapi" "*linux*$(arch_resolve).zip"
|
fetch_and_deploy_gh_release "gokapi" "Forceu/Gokapi" "prebuild" "latest" "/opt/gokapi" "*linux*amd64.zip"
|
||||||
|
|
||||||
msg_info "Configuring Gokapi"
|
msg_info "Configuring Gokapi"
|
||||||
mkdir -p /opt/gokapi/{data,config}
|
mkdir -p /opt/gokapi/{data,config}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "gotify" "gotify/server" "prebuild" "latest" "/opt/gotify" "gotify-linux-$(arch_resolve).zip"
|
fetch_and_deploy_gh_release "gotify" "gotify/server" "prebuild" "latest" "/opt/gotify" "gotify-linux-amd64.zip"
|
||||||
chmod +x /opt/gotify/gotify-linux-$(arch_resolve)
|
chmod +x /opt/gotify/gotify-linux-amd64
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/gotify.service
|
cat <<EOF >/etc/systemd/system/gotify.service
|
||||||
@@ -27,7 +27,7 @@ After=network.target
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/gotify
|
WorkingDirectory=/opt/gotify
|
||||||
ExecStart=/opt/gotify/./gotify-linux-$(arch_resolve)
|
ExecStart=/opt/gotify/./gotify-linux-amd64
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=3
|
RestartSec=3
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "hev-socks5-server" "heiher/hev-socks5-server" "singlefile" "latest" "/opt" "hev-socks5-server-linux-$(arch_resolve "x86_64" "arm64")"
|
fetch_and_deploy_gh_release "hev-socks5-server" "heiher/hev-socks5-server" "singlefile" "latest" "/opt" "hev-socks5-server-linux-x86_64"
|
||||||
|
|
||||||
msg_info "Setup hev-socks5-server"
|
msg_info "Setup hev-socks5-server"
|
||||||
mkdir -p /etc/hev-socks5-server
|
mkdir -p /etc/hev-socks5-server
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ 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]')
|
||||||
setup_nodejs
|
setup_nodejs
|
||||||
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-debian-$(arch_resolve).tar.gz"
|
fetch_and_deploy_gh_release "homarr" "homarr-labs/homarr" "prebuild" "latest" "/opt/homarr" "build-debian-amd64.tar.gz"
|
||||||
|
|
||||||
msg_info "Installing Homarr"
|
msg_info "Installing Homarr"
|
||||||
mkdir -p /opt/homarr_db
|
mkdir -p /opt/homarr_db
|
||||||
|
|||||||
@@ -30,9 +30,32 @@ get_latest_release() {
|
|||||||
curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
curl -fsSL https://api.github.com/repos/$1/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DOCKER_LATEST_VERSION=$(get_latest_release "moby/moby")
|
||||||
CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core")
|
CORE_LATEST_VERSION=$(get_latest_release "home-assistant/core")
|
||||||
|
PORTAINER_LATEST_VERSION=$(get_latest_release "portainer/portainer")
|
||||||
|
|
||||||
DOCKER_PORTAINER="true" setup_docker
|
msg_info "Installing Docker $DOCKER_LATEST_VERSION"
|
||||||
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||||
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||||
|
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
||||||
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
|
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
|
||||||
|
|
||||||
|
msg_info "Pulling Portainer $PORTAINER_LATEST_VERSION Image"
|
||||||
|
$STD docker pull portainer/portainer-ce:latest
|
||||||
|
msg_ok "Pulled Portainer $PORTAINER_LATEST_VERSION Image"
|
||||||
|
|
||||||
|
msg_info "Installing Portainer $PORTAINER_LATEST_VERSION"
|
||||||
|
$STD docker volume create portainer_data
|
||||||
|
$STD docker run -d \
|
||||||
|
-p 8000:8000 \
|
||||||
|
-p 9443:9443 \
|
||||||
|
--name=portainer \
|
||||||
|
--restart=always \
|
||||||
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
|
-v portainer_data:/data \
|
||||||
|
portainer/portainer-ce:latest
|
||||||
|
msg_ok "Installed Portainer $PORTAINER_LATEST_VERSION"
|
||||||
|
|
||||||
msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image"
|
msg_info "Pulling Home Assistant $CORE_LATEST_VERSION Image"
|
||||||
$STD docker pull ghcr.io/home-assistant/home-assistant:stable
|
$STD docker pull ghcr.io/home-assistant/home-assistant:stable
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "homebox" "sysadminsmedia/homebox" "prebuild" "latest" "/opt/homebox" "homebox_Linux_$(arch_resolve "x86_64" "arm64").tar.gz"
|
fetch_and_deploy_gh_release "homebox" "sysadminsmedia/homebox" "prebuild" "latest" "/opt/homebox" "homebox_Linux_x86_64.tar.gz"
|
||||||
|
|
||||||
msg_info "Configuring Homebox"
|
msg_info "Configuring Homebox"
|
||||||
chmod +x /opt/homebox/homebox
|
chmod +x /opt/homebox/homebox
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*$(arch_resolve "x86_64" "arm64").tar.gz"
|
fetch_and_deploy_gh_release "hoodik" "hudikhq/hoodik" "prebuild" "latest" "/opt/hoodik" "*x86_64.tar.gz"
|
||||||
|
|
||||||
msg_info "Configuring Hoodik"
|
msg_info "Configuring Hoodik"
|
||||||
mkdir -p /opt/hoodik_data
|
mkdir -p /opt/hoodik_data
|
||||||
|
|||||||
@@ -13,7 +13,9 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
setup_docker
|
msg_info "Installing Docker"
|
||||||
|
$STD sh <(curl -fsSL https://get.docker.com/)
|
||||||
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
msg_info "Detecting latest Kasm Workspaces release"
|
msg_info "Detecting latest Kasm Workspaces release"
|
||||||
KASM_URL=$(curl -s https://kasm.com/downloads \
|
KASM_URL=$(curl -s https://kasm.com/downloads \
|
||||||
|
|||||||
@@ -13,7 +13,13 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
setup_docker
|
msg_info "Installing Docker"
|
||||||
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||||
|
mkdir -p "$(dirname $DOCKER_CONFIG_PATH)"
|
||||||
|
echo -e '{\n "log-driver": "journald"\n}' >"$DOCKER_CONFIG_PATH"
|
||||||
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
|
systemctl enable -q --now docker
|
||||||
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "wings" "pelican-dev/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
fetch_and_deploy_gh_release "wings" "pelican-dev/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
||||||
mkdir -p /etc/pelican /var/run/wings
|
mkdir -p /etc/pelican /var/run/wings
|
||||||
|
|||||||
@@ -1,386 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2026 community-scripts ORG
|
|
||||||
# Author: onionrings29
|
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
|
||||||
# Source: https://plane.so
|
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
|
||||||
color
|
|
||||||
verb_ip6
|
|
||||||
catch_errors
|
|
||||||
setting_up_container
|
|
||||||
network_check
|
|
||||||
update_os
|
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
|
||||||
$STD apt install -y \
|
|
||||||
nginx \
|
|
||||||
build-essential \
|
|
||||||
libpq-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libxslt1-dev \
|
|
||||||
libxmlsec1-dev \
|
|
||||||
libxmlsec1-openssl \
|
|
||||||
pkg-config \
|
|
||||||
python3-dev \
|
|
||||||
python3-venv \
|
|
||||||
redis-server \
|
|
||||||
erlang-base \
|
|
||||||
erlang-{asn1,crypto,eldap,ftp,inets,mnesia,os-mon,parsetools} \
|
|
||||||
erlang-{public-key,runtime-tools,snmp,ssl,syntax-tools,tftp,tools,xmerl} \
|
|
||||||
rabbitmq-server
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
NODE_VERSION="24" setup_nodejs
|
|
||||||
PG_VERSION="16" setup_postgresql
|
|
||||||
PG_DB_NAME="plane" PG_DB_USER="plane" setup_postgresql_db
|
|
||||||
|
|
||||||
msg_info "Configuring RabbitMQ"
|
|
||||||
RABBITMQ_PASS=$(openssl rand -base64 24 | tr -dc 'a-zA-Z0-9' | head -c16)
|
|
||||||
$STD rabbitmqctl add_vhost plane
|
|
||||||
$STD rabbitmqctl add_user plane "${RABBITMQ_PASS}"
|
|
||||||
$STD rabbitmqctl set_permissions -p plane plane ".*" ".*" ".*"
|
|
||||||
msg_ok "Configured RabbitMQ"
|
|
||||||
|
|
||||||
msg_info "Installing MinIO"
|
|
||||||
curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio -o /usr/local/bin/minio
|
|
||||||
chmod +x /usr/local/bin/minio
|
|
||||||
mkdir -p /opt/minio/data
|
|
||||||
MINIO_ACCESS_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16)
|
|
||||||
MINIO_SECRET_KEY=$(openssl rand -base64 36 | tr -dc 'a-zA-Z0-9' | head -c32)
|
|
||||||
cat <<EOF >/etc/default/minio
|
|
||||||
MINIO_ROOT_USER="${MINIO_ACCESS_KEY}"
|
|
||||||
MINIO_ROOT_PASSWORD="${MINIO_SECRET_KEY}"
|
|
||||||
MINIO_VOLUMES="/opt/minio/data"
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/etc/systemd/system/minio.service
|
|
||||||
[Unit]
|
|
||||||
Description=MinIO Object Storage
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
EnvironmentFile=/etc/default/minio
|
|
||||||
ExecStart=/usr/local/bin/minio server \$MINIO_VOLUMES --console-address ":9090"
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now minio
|
|
||||||
msg_ok "Installed MinIO"
|
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "plane" "makeplane/plane" "tarball"
|
|
||||||
|
|
||||||
msg_info "Building Frontend Apps (Patience)"
|
|
||||||
cd /opt/plane
|
|
||||||
FRONTEND_ENV="VITE_API_BASE_URL=http://${LOCAL_IP}
|
|
||||||
VITE_WEB_BASE_URL=http://${LOCAL_IP}
|
|
||||||
VITE_ADMIN_BASE_URL=http://${LOCAL_IP}
|
|
||||||
VITE_ADMIN_BASE_PATH=/god-mode
|
|
||||||
VITE_SPACE_BASE_URL=http://${LOCAL_IP}
|
|
||||||
VITE_SPACE_BASE_PATH=/spaces
|
|
||||||
VITE_LIVE_BASE_URL=http://${LOCAL_IP}
|
|
||||||
VITE_LIVE_BASE_PATH=/live"
|
|
||||||
# Each Vite app needs its own .env for the build
|
|
||||||
for app in web admin space; do
|
|
||||||
echo "$FRONTEND_ENV" >/opt/plane/apps/${app}/.env
|
|
||||||
done
|
|
||||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
|
||||||
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
|
||||||
$STD corepack enable pnpm
|
|
||||||
$STD pnpm install --frozen-lockfile
|
|
||||||
$STD pnpm turbo run build --filter=web --filter=admin --filter=space --filter=live
|
|
||||||
msg_ok "Built Frontend Apps"
|
|
||||||
|
|
||||||
msg_info "Setting up Python API"
|
|
||||||
setup_uv
|
|
||||||
$STD uv venv /opt/plane-venv
|
|
||||||
export VIRTUAL_ENV=/opt/plane-venv
|
|
||||||
$STD uv pip install -r /opt/plane/apps/api/requirements/production.txt
|
|
||||||
msg_ok "Set up Python API"
|
|
||||||
|
|
||||||
msg_info "Configuring Plane"
|
|
||||||
SECRET_KEY=$(openssl rand -hex 32)
|
|
||||||
MACHINE_SIG=$(echo -n "$(hostname)-$(date +%s)" | sha256sum | head -c64)
|
|
||||||
LIVE_SECRET=$(openssl rand -hex 16)
|
|
||||||
cat <<EOF >/opt/plane/apps/api/.env
|
|
||||||
DEBUG=0
|
|
||||||
CORS_ALLOWED_ORIGINS=http://${LOCAL_IP}
|
|
||||||
|
|
||||||
POSTGRES_USER=plane
|
|
||||||
POSTGRES_PASSWORD=${PG_DB_PASS}
|
|
||||||
POSTGRES_HOST=localhost
|
|
||||||
POSTGRES_DB=plane
|
|
||||||
POSTGRES_PORT=5432
|
|
||||||
DATABASE_URL=postgresql://plane:${PG_DB_PASS}@localhost:5432/plane
|
|
||||||
|
|
||||||
REDIS_HOST=localhost
|
|
||||||
REDIS_PORT=6379
|
|
||||||
REDIS_URL=redis://localhost:6379/
|
|
||||||
|
|
||||||
RABBITMQ_HOST=localhost
|
|
||||||
RABBITMQ_PORT=5672
|
|
||||||
RABBITMQ_USER=plane
|
|
||||||
RABBITMQ_PASSWORD=${RABBITMQ_PASS}
|
|
||||||
RABBITMQ_VHOST=plane
|
|
||||||
AMQP_URL=amqp://plane:${RABBITMQ_PASS}@localhost:5672/plane
|
|
||||||
|
|
||||||
AWS_REGION=us-east-1
|
|
||||||
AWS_ACCESS_KEY_ID=${MINIO_ACCESS_KEY}
|
|
||||||
AWS_SECRET_ACCESS_KEY=${MINIO_SECRET_KEY}
|
|
||||||
AWS_S3_ENDPOINT_URL=http://localhost:9000
|
|
||||||
AWS_S3_BUCKET_NAME=uploads
|
|
||||||
FILE_SIZE_LIMIT=104857600
|
|
||||||
|
|
||||||
USE_MINIO=1
|
|
||||||
MINIO_ENDPOINT_SSL=0
|
|
||||||
SECRET_KEY=${SECRET_KEY}
|
|
||||||
MACHINE_SIGNATURE=${MACHINE_SIG}
|
|
||||||
|
|
||||||
WEB_URL=http://${LOCAL_IP}
|
|
||||||
ADMIN_BASE_URL=http://${LOCAL_IP}
|
|
||||||
ADMIN_BASE_PATH=/god-mode
|
|
||||||
SPACE_BASE_URL=http://${LOCAL_IP}
|
|
||||||
SPACE_BASE_PATH=/spaces
|
|
||||||
APP_BASE_URL=http://${LOCAL_IP}
|
|
||||||
APP_BASE_PATH=
|
|
||||||
LIVE_BASE_URL=http://${LOCAL_IP}
|
|
||||||
LIVE_BASE_PATH=/live
|
|
||||||
|
|
||||||
GUNICORN_WORKERS=2
|
|
||||||
LIVE_SERVER_SECRET_KEY=${LIVE_SECRET}
|
|
||||||
API_KEY_RATE_LIMIT=60/minute
|
|
||||||
EOF
|
|
||||||
cat <<EOF >/opt/plane/.env
|
|
||||||
API_BASE_URL=http://localhost:8000
|
|
||||||
LIVE_SERVER_SECRET_KEY=${LIVE_SECRET}
|
|
||||||
REDIS_HOST=localhost
|
|
||||||
REDIS_PORT=6379
|
|
||||||
REDIS_URL=redis://localhost:6379/
|
|
||||||
PORT=3100
|
|
||||||
EOF
|
|
||||||
msg_ok "Configured Plane"
|
|
||||||
|
|
||||||
msg_info "Running Database Migrations"
|
|
||||||
cd /opt/plane/apps/api
|
|
||||||
set -a
|
|
||||||
source /opt/plane/apps/api/.env
|
|
||||||
set +a
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py migrate
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py collectstatic --noinput
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py configure_instance
|
|
||||||
$STD /opt/plane-venv/bin/python manage.py register_instance "${MACHINE_SIG}"
|
|
||||||
msg_ok "Ran Database Migrations"
|
|
||||||
|
|
||||||
msg_info "Creating Services and MinIO Bucket"
|
|
||||||
curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mcli
|
|
||||||
chmod +x /usr/local/bin/mcli
|
|
||||||
$STD /usr/local/bin/mcli alias set plane http://localhost:9000 "${MINIO_ACCESS_KEY}" "${MINIO_SECRET_KEY}"
|
|
||||||
$STD /usr/local/bin/mcli mb plane/uploads --ignore-existing
|
|
||||||
$STD /usr/local/bin/mcli anonymous set download plane/uploads
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/plane-api.service
|
|
||||||
[Unit]
|
|
||||||
Description=Plane API
|
|
||||||
After=network.target postgresql.service redis-server.service rabbitmq-server.service minio.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/plane/apps/api
|
|
||||||
EnvironmentFile=/opt/plane/apps/api/.env
|
|
||||||
ExecStart=/opt/plane-venv/bin/gunicorn -w 2 -k uvicorn.workers.UvicornWorker plane.asgi:application --bind 0.0.0.0:8000 --max-requests 1200 --max-requests-jitter 1000 --access-logfile -
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/plane-worker.service
|
|
||||||
[Unit]
|
|
||||||
Description=Plane Celery Worker
|
|
||||||
After=plane-api.service
|
|
||||||
Requires=plane-api.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/plane/apps/api
|
|
||||||
EnvironmentFile=/opt/plane/apps/api/.env
|
|
||||||
ExecStart=/opt/plane-venv/bin/celery -A plane worker -l info
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/plane-beat.service
|
|
||||||
[Unit]
|
|
||||||
Description=Plane Celery Beat
|
|
||||||
After=plane-api.service
|
|
||||||
Requires=plane-api.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/plane/apps/api
|
|
||||||
EnvironmentFile=/opt/plane/apps/api/.env
|
|
||||||
ExecStart=/opt/plane-venv/bin/celery -A plane beat -l info
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/plane-live.service
|
|
||||||
[Unit]
|
|
||||||
Description=Plane Live Server
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/plane
|
|
||||||
EnvironmentFile=/opt/plane/.env
|
|
||||||
ExecStart=/usr/bin/node apps/live/dist/start.mjs
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/plane-space.service
|
|
||||||
[Unit]
|
|
||||||
Description=Plane Space Server
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=simple
|
|
||||||
WorkingDirectory=/opt/plane/apps/space
|
|
||||||
Environment=PORT=3002
|
|
||||||
Environment=NODE_ENV=production
|
|
||||||
ExecStart=/opt/plane/apps/space/node_modules/.bin/react-router-serve ./build/server/index.js
|
|
||||||
Restart=on-failure
|
|
||||||
RestartSec=5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl daemon-reload
|
|
||||||
systemctl enable -q --now plane-api plane-worker plane-beat plane-live plane-space
|
|
||||||
{
|
|
||||||
echo "RabbitMQ User: plane"
|
|
||||||
echo "RabbitMQ Password: ${RABBITMQ_PASS}"
|
|
||||||
echo "MinIO Access Key: ${MINIO_ACCESS_KEY}"
|
|
||||||
echo "MinIO Secret Key: ${MINIO_SECRET_KEY}"
|
|
||||||
echo "Secret Key: ${SECRET_KEY}"
|
|
||||||
echo "Config: /opt/plane/apps/api/.env"
|
|
||||||
} >>~/plane.creds
|
|
||||||
msg_ok "Created Services and MinIO Bucket"
|
|
||||||
|
|
||||||
msg_info "Configuring Nginx"
|
|
||||||
cat <<'EOF' >/etc/nginx/sites-available/plane.conf
|
|
||||||
upstream plane-api {
|
|
||||||
server 127.0.0.1:8000;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream plane-live {
|
|
||||||
server 127.0.0.1:3100;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream plane-space {
|
|
||||||
server 127.0.0.1:3002;
|
|
||||||
}
|
|
||||||
|
|
||||||
upstream plane-minio {
|
|
||||||
server 127.0.0.1:9000;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
server_name _;
|
|
||||||
client_max_body_size 100M;
|
|
||||||
|
|
||||||
location /api/ {
|
|
||||||
proxy_pass http://plane-api;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /auth/ {
|
|
||||||
proxy_pass http://plane-api;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /static/ {
|
|
||||||
alias /opt/plane/apps/api/plane/static-assets/collected-static/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /live/ {
|
|
||||||
proxy_pass http://plane-live;
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /uploads {
|
|
||||||
proxy_pass http://plane-minio;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /uploads/ {
|
|
||||||
proxy_pass http://plane-minio;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /spaces/ {
|
|
||||||
proxy_pass http://plane-space;
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /spaces {
|
|
||||||
return 301 /spaces/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /god-mode/ {
|
|
||||||
alias /opt/plane/apps/admin/build/client/;
|
|
||||||
try_files $uri $uri/ /god-mode/index.html;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /god-mode {
|
|
||||||
return 301 /god-mode/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root /opt/plane/apps/web/build/client;
|
|
||||||
try_files $uri $uri/ /index.html;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
ln -sf /etc/nginx/sites-available/plane.conf /etc/nginx/sites-enabled/plane.conf
|
|
||||||
rm -f /etc/nginx/sites-enabled/default
|
|
||||||
$STD systemctl reload nginx
|
|
||||||
msg_ok "Configured Nginx"
|
|
||||||
|
|
||||||
motd_ssh
|
|
||||||
customize
|
|
||||||
cleanup_lxc
|
|
||||||
@@ -13,7 +13,13 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
setup_docker
|
msg_info "Installing Docker"
|
||||||
|
DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
||||||
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||||
|
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
||||||
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
|
systemctl enable -q --now docker
|
||||||
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
fetch_and_deploy_gh_release "wings" "pterodactyl/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
fetch_and_deploy_gh_release "wings" "pterodactyl/wings" "singlefile" "latest" "/usr/local/bin" "wings_linux_amd64"
|
||||||
mkdir -p /etc/pterodactyl
|
mkdir -p /etc/pterodactyl
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ network_check() {
|
|||||||
# This function updates the Container OS by running apk upgrade with mirror fallback
|
# This function updates the Container OS by running apk upgrade with mirror fallback
|
||||||
update_os() {
|
update_os() {
|
||||||
msg_info "Updating Container OS"
|
msg_info "Updating Container OS"
|
||||||
|
configure_http_proxy
|
||||||
if ! $STD apk -U upgrade; then
|
if ! $STD apk -U upgrade; then
|
||||||
msg_warn "apk update failed (dl-cdn.alpinelinux.org), trying alternate mirrors..."
|
msg_warn "apk update failed (dl-cdn.alpinelinux.org), trying alternate mirrors..."
|
||||||
local alpine_mirrors="mirror.init7.net ftp.halifax.rwth-aachen.de mirrors.edge.kernel.org alpine.mirror.wearetriple.com mirror.leaseweb.com uk.alpinelinux.org dl-2.alpinelinux.org dl-4.alpinelinux.org"
|
local alpine_mirrors="mirror.init7.net ftp.halifax.rwth-aachen.de mirrors.edge.kernel.org alpine.mirror.wearetriple.com mirror.leaseweb.com uk.alpinelinux.org dl-2.alpinelinux.org dl-4.alpinelinux.org"
|
||||||
@@ -243,7 +244,7 @@ EOF
|
|||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo 'set -a; [ -f /etc/profile.d/90-http-proxy.sh ] && . /etc/profile.d/90-http-proxy.sh; set +a; bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/'"${app}"'.sh)"' >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
post_progress_to_api
|
post_progress_to_api
|
||||||
}
|
}
|
||||||
|
|||||||
+141
-17
@@ -1018,6 +1018,9 @@ base_settings() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
HTTP_PROXY="${var_http_proxy:-}"
|
||||||
|
HTTP_NO_PROXY="${var_http_no_proxy:-}"
|
||||||
|
|
||||||
MTU=${var_mtu:-""}
|
MTU=${var_mtu:-""}
|
||||||
_sd_val="${var_searchdomain:-""}"
|
_sd_val="${var_searchdomain:-""}"
|
||||||
[[ -n "$_sd_val" ]] && SD="-searchdomain=$_sd_val" || SD=""
|
[[ -n "$_sd_val" ]] && SD="-searchdomain=$_sd_val" || SD=""
|
||||||
@@ -1071,7 +1074,7 @@ load_vars_file() {
|
|||||||
|
|
||||||
# Allowed var_* keys
|
# Allowed var_* keys
|
||||||
local VAR_WHITELIST=(
|
local VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_github_token var_gpu var_keyctl
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_github_token var_gpu var_http_no_proxy var_http_proxy var_keyctl
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
||||||
@@ -1250,6 +1253,18 @@ load_vars_file() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
var_http_proxy)
|
||||||
|
if [[ -n "$var_val" ]] && ! [[ "$var_val" =~ ^https?://[^[:space:]]+(:[0-9]+)?/?$ ]]; then
|
||||||
|
msg_warn "Invalid HTTP proxy URL '$var_val' in $file, ignoring"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
var_http_no_proxy)
|
||||||
|
if [[ -n "$var_val" ]] && [[ ! "$var_val" =~ ^[a-zA-Z0-9.*_:/-]+(,[a-zA-Z0-9.*_:/-]+)*$ ]]; then
|
||||||
|
msg_warn "Invalid no_proxy value '$var_val' in $file, ignoring"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
;;
|
||||||
var_container_storage | var_template_storage)
|
var_container_storage | var_template_storage)
|
||||||
# Validate that the storage exists and is active on the current node
|
# Validate that the storage exists and is active on the current node
|
||||||
local _storage_status
|
local _storage_status
|
||||||
@@ -1289,7 +1304,7 @@ default_var_settings() {
|
|||||||
# Allowed var_* keys (alphabetically sorted)
|
# Allowed var_* keys (alphabetically sorted)
|
||||||
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
||||||
local VAR_WHITELIST=(
|
local VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_github_token var_gpu var_keyctl
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_github_token var_gpu var_http_no_proxy var_http_proxy var_keyctl
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage
|
||||||
@@ -1369,6 +1384,10 @@ var_ssh=no
|
|||||||
# var_apt_cacher_ip=http://proxy.local
|
# var_apt_cacher_ip=http://proxy.local
|
||||||
# var_apt_cacher_ip=https://proxy.local:443
|
# var_apt_cacher_ip=https://proxy.local:443
|
||||||
|
|
||||||
|
# HTTP/HTTPS proxy (optional - for networks requiring a proxy)
|
||||||
|
# var_http_proxy=http://proxy.local:8080
|
||||||
|
# var_http_no_proxy=localhost,127.0.0.1,.local
|
||||||
|
|
||||||
# Features/Tags/verbosity
|
# Features/Tags/verbosity
|
||||||
var_fuse=no
|
var_fuse=no
|
||||||
var_tun=no
|
var_tun=no
|
||||||
@@ -1468,7 +1487,7 @@ get_app_defaults_path() {
|
|||||||
if ! declare -p VAR_WHITELIST >/dev/null 2>&1; then
|
if ! declare -p VAR_WHITELIST >/dev/null 2>&1; then
|
||||||
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
# Note: Removed var_ctid (can only exist once), var_ipv6_static (static IPs are unique)
|
||||||
declare -ag VAR_WHITELIST=(
|
declare -ag VAR_WHITELIST=(
|
||||||
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_github_token var_gpu var_keyctl
|
var_apt_cacher var_apt_cacher_ip var_brg var_cpu var_disk var_fuse var_github_token var_gpu var_http_no_proxy var_http_proxy var_keyctl
|
||||||
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
var_gateway var_hostname var_ipv6_method var_mac var_mknod var_mount_fs var_mtu
|
||||||
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
var_net var_nesting var_ns var_os var_protection var_pw var_ram var_tags var_timezone var_tun var_unprivileged
|
||||||
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
var_verbose var_version var_vlan var_ssh var_ssh_authorized_key var_container_storage var_template_storage var_searchdomain
|
||||||
@@ -1616,6 +1635,8 @@ _build_current_app_vars_tmp() {
|
|||||||
_ssh_auth="${SSH_AUTHORIZED_KEY:-}"
|
_ssh_auth="${SSH_AUTHORIZED_KEY:-}"
|
||||||
_apt_cacher="${APT_CACHER:-}"
|
_apt_cacher="${APT_CACHER:-}"
|
||||||
_apt_cacher_ip="${APT_CACHER_IP:-}"
|
_apt_cacher_ip="${APT_CACHER_IP:-}"
|
||||||
|
_http_proxy="${HTTP_PROXY:-${var_http_proxy:-}}"
|
||||||
|
_http_no_proxy="${HTTP_NO_PROXY:-${var_http_no_proxy:-}}"
|
||||||
_fuse="${ENABLE_FUSE:-no}"
|
_fuse="${ENABLE_FUSE:-no}"
|
||||||
_tun="${ENABLE_TUN:-no}"
|
_tun="${ENABLE_TUN:-no}"
|
||||||
_gpu="${ENABLE_GPU:-no}"
|
_gpu="${ENABLE_GPU:-no}"
|
||||||
@@ -1667,6 +1688,8 @@ _build_current_app_vars_tmp() {
|
|||||||
|
|
||||||
[ -n "$_apt_cacher" ] && echo "var_apt_cacher=$(_sanitize_value "$_apt_cacher")"
|
[ -n "$_apt_cacher" ] && echo "var_apt_cacher=$(_sanitize_value "$_apt_cacher")"
|
||||||
[ -n "$_apt_cacher_ip" ] && echo "var_apt_cacher_ip=$(_sanitize_value "$_apt_cacher_ip")"
|
[ -n "$_apt_cacher_ip" ] && echo "var_apt_cacher_ip=$(_sanitize_value "$_apt_cacher_ip")"
|
||||||
|
[ -n "$_http_proxy" ] && echo "var_http_proxy=$(_sanitize_value "$_http_proxy")"
|
||||||
|
[ -n "$_http_no_proxy" ] && echo "var_http_no_proxy=$(_sanitize_value "$_http_no_proxy")"
|
||||||
|
|
||||||
[ -n "$_fuse" ] && echo "var_fuse=$(_sanitize_value "$_fuse")"
|
[ -n "$_fuse" ] && echo "var_fuse=$(_sanitize_value "$_fuse")"
|
||||||
[ -n "$_tun" ] && echo "var_tun=$(_sanitize_value "$_tun")"
|
[ -n "$_tun" ] && echo "var_tun=$(_sanitize_value "$_tun")"
|
||||||
@@ -1830,7 +1853,7 @@ advanced_settings() {
|
|||||||
TAGS="community-script${var_tags:+;${var_tags}}"
|
TAGS="community-script${var_tags:+;${var_tags}}"
|
||||||
fi
|
fi
|
||||||
local STEP=1
|
local STEP=1
|
||||||
local MAX_STEP=29
|
local MAX_STEP=30
|
||||||
|
|
||||||
# Store values for back navigation - inherit from var_* app defaults
|
# Store values for back navigation - inherit from var_* app defaults
|
||||||
local _ct_type="${var_unprivileged:-1}"
|
local _ct_type="${var_unprivileged:-1}"
|
||||||
@@ -1849,6 +1872,8 @@ advanced_settings() {
|
|||||||
local _ipv6_gate=""
|
local _ipv6_gate=""
|
||||||
local _apt_cacher="${var_apt_cacher:-no}"
|
local _apt_cacher="${var_apt_cacher:-no}"
|
||||||
local _apt_cacher_ip="${var_apt_cacher_ip:-}"
|
local _apt_cacher_ip="${var_apt_cacher_ip:-}"
|
||||||
|
local _http_proxy="${var_http_proxy:-}"
|
||||||
|
local _http_no_proxy="${var_http_no_proxy:-}"
|
||||||
local _mtu="${var_mtu:-}"
|
local _mtu="${var_mtu:-}"
|
||||||
local _sd="${var_searchdomain:-}"
|
local _sd="${var_searchdomain:-}"
|
||||||
local _ns="${var_ns:-}"
|
local _ns="${var_ns:-}"
|
||||||
@@ -2626,9 +2651,46 @@ advanced_settings() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 24: Container Timezone
|
# STEP 24: HTTP/HTTPS Proxy
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
24)
|
24)
|
||||||
|
local http_proxy_default_flag="--defaultno"
|
||||||
|
[[ -n "$_http_proxy" ]] && http_proxy_default_flag=""
|
||||||
|
|
||||||
|
if whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "HTTP/HTTPS PROXY" \
|
||||||
|
--ok-button "Next" --cancel-button "Back" \
|
||||||
|
$http_proxy_default_flag \
|
||||||
|
--yesno "\nUse HTTP/HTTPS proxy?\n\nRequired when internet access must go through a proxy server.\n(e.g. corporate networks)\n\n(App default: ${var_http_proxy:-none})" 14 62; then
|
||||||
|
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "HTTP PROXY URL" \
|
||||||
|
--inputbox "\nEnter HTTP proxy URL:\n(e.g. http://proxy.local:8080)" 12 62 "$_http_proxy" \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
_http_proxy="$result"
|
||||||
|
local _no_proxy_default="${_http_no_proxy:-localhost,127.0.0.1,.local}"
|
||||||
|
if result=$(whiptail --backtitle "Proxmox VE Helper Scripts [Step $STEP/$MAX_STEP]" \
|
||||||
|
--title "NO_PROXY EXCEPTIONS" \
|
||||||
|
--inputbox "\nEnter NO_PROXY exceptions (comma-separated):\nLeave empty for defaults." 12 62 "$_no_proxy_default" \
|
||||||
|
3>&1 1>&2 2>&3); then
|
||||||
|
_http_no_proxy="$result"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
_http_proxy=""
|
||||||
|
_http_no_proxy=""
|
||||||
|
else
|
||||||
|
((STEP--))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
((STEP++))
|
||||||
|
;;
|
||||||
|
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
# STEP 25: Container Timezone
|
||||||
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
|
25)
|
||||||
local tz_hint="$_ct_timezone"
|
local tz_hint="$_ct_timezone"
|
||||||
[[ -z "$tz_hint" ]] && tz_hint="(empty - will use host timezone)"
|
[[ -z "$tz_hint" ]] && tz_hint="(empty - will use host timezone)"
|
||||||
|
|
||||||
@@ -2651,9 +2713,9 @@ advanced_settings() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 25: Container Protection
|
# STEP 26: Container Protection
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
25)
|
26)
|
||||||
local protect_default_flag="--defaultno"
|
local protect_default_flag="--defaultno"
|
||||||
[[ "$_protect_ct" == "yes" || "$_protect_ct" == "1" ]] && protect_default_flag=""
|
[[ "$_protect_ct" == "yes" || "$_protect_ct" == "1" ]] && protect_default_flag=""
|
||||||
|
|
||||||
@@ -2675,9 +2737,9 @@ advanced_settings() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 26: Device Node Creation (mknod)
|
# STEP 27: Device Node Creation (mknod)
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
26)
|
27)
|
||||||
local mknod_default_flag="--defaultno"
|
local mknod_default_flag="--defaultno"
|
||||||
[[ "$_enable_mknod" == "1" ]] && mknod_default_flag=""
|
[[ "$_enable_mknod" == "1" ]] && mknod_default_flag=""
|
||||||
|
|
||||||
@@ -2699,9 +2761,9 @@ advanced_settings() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 27: Mount Filesystems
|
# STEP 28: Mount Filesystems
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
27)
|
28)
|
||||||
local mount_hint=""
|
local mount_hint=""
|
||||||
[[ -n "$_mount_fs" ]] && mount_hint="$_mount_fs" || mount_hint="(none)"
|
[[ -n "$_mount_fs" ]] && mount_hint="$_mount_fs" || mount_hint="(none)"
|
||||||
|
|
||||||
@@ -2722,9 +2784,9 @@ advanced_settings() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 28: Optional host-side post-install hook (path on the Proxmox HOST)
|
# STEP 29: Optional host-side post-install hook (path on the Proxmox HOST)
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
28)
|
29)
|
||||||
local _hook_prompt="Optional: absolute path to a *.sh file ON THE PROXMOX HOST.
|
local _hook_prompt="Optional: absolute path to a *.sh file ON THE PROXMOX HOST.
|
||||||
|
|
||||||
It runs as root on the HOST (NOT in the LXC) after the container
|
It runs as root on the HOST (NOT in the LXC) after the container
|
||||||
@@ -2774,9 +2836,9 @@ Leave empty to skip."
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
# STEP 29: Verbose Mode & Confirmation
|
# STEP 30: Verbose Mode & Confirmation
|
||||||
# ═══════════════════════════════════════════════════════════════════════════
|
# ═══════════════════════════════════════════════════════════════════════════
|
||||||
29)
|
30)
|
||||||
local verbose_default_flag="--defaultno"
|
local verbose_default_flag="--defaultno"
|
||||||
[[ "$_verbose" == "yes" ]] && verbose_default_flag=""
|
[[ "$_verbose" == "yes" ]] && verbose_default_flag=""
|
||||||
|
|
||||||
@@ -2804,6 +2866,7 @@ Leave empty to skip."
|
|||||||
local tz_display="${_ct_timezone:-Host TZ}"
|
local tz_display="${_ct_timezone:-Host TZ}"
|
||||||
local apt_display="${_apt_cacher:-no}"
|
local apt_display="${_apt_cacher:-no}"
|
||||||
[[ "$_apt_cacher" == "yes" && -n "$_apt_cacher_ip" ]] && apt_display="$_apt_cacher_ip"
|
[[ "$_apt_cacher" == "yes" && -n "$_apt_cacher_ip" ]] && apt_display="$_apt_cacher_ip"
|
||||||
|
local http_proxy_display="${_http_proxy:-(none)}"
|
||||||
|
|
||||||
local post_install_display="${_post_install:-(none)}"
|
local post_install_display="${_post_install:-(none)}"
|
||||||
local post_install_warn=""
|
local post_install_warn=""
|
||||||
@@ -2833,6 +2896,7 @@ Features:
|
|||||||
Advanced:
|
Advanced:
|
||||||
Timezone: $tz_display
|
Timezone: $tz_display
|
||||||
APT Cacher: $apt_display
|
APT Cacher: $apt_display
|
||||||
|
HTTP Proxy: $http_proxy_display
|
||||||
Verbose: $_verbose
|
Verbose: $_verbose
|
||||||
Post-Install Script: ${post_install_display}${post_install_warn}"
|
Post-Install Script: ${post_install_display}${post_install_warn}"
|
||||||
|
|
||||||
@@ -2876,6 +2940,8 @@ Advanced:
|
|||||||
CT_TIMEZONE="$_ct_timezone"
|
CT_TIMEZONE="$_ct_timezone"
|
||||||
APT_CACHER="$_apt_cacher"
|
APT_CACHER="$_apt_cacher"
|
||||||
APT_CACHER_IP="$_apt_cacher_ip"
|
APT_CACHER_IP="$_apt_cacher_ip"
|
||||||
|
HTTP_PROXY="$_http_proxy"
|
||||||
|
HTTP_NO_PROXY="$_http_no_proxy"
|
||||||
VERBOSE="$_verbose"
|
VERBOSE="$_verbose"
|
||||||
var_post_install="$_post_install"
|
var_post_install="$_post_install"
|
||||||
|
|
||||||
@@ -2891,6 +2957,8 @@ Advanced:
|
|||||||
var_timezone="$_ct_timezone"
|
var_timezone="$_ct_timezone"
|
||||||
var_apt_cacher="$_apt_cacher"
|
var_apt_cacher="$_apt_cacher"
|
||||||
var_apt_cacher_ip="$_apt_cacher_ip"
|
var_apt_cacher_ip="$_apt_cacher_ip"
|
||||||
|
var_http_proxy="$_http_proxy"
|
||||||
|
var_http_no_proxy="$_http_no_proxy"
|
||||||
|
|
||||||
# Format optional values
|
# Format optional values
|
||||||
[[ -n "$_mtu" ]] && MTU=",mtu=$_mtu" || MTU=""
|
[[ -n "$_mtu" ]] && MTU=",mtu=$_mtu" || MTU=""
|
||||||
@@ -2928,6 +2996,7 @@ Advanced:
|
|||||||
[[ "${PROTECT_CT:-no}" == "yes" || "${PROTECT_CT:-no}" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Protection: ${BGN}Enabled${CL}"
|
[[ "${PROTECT_CT:-no}" == "yes" || "${PROTECT_CT:-no}" == "1" ]] && echo -e "${CONTAINERTYPE}${BOLD}${DGN}Protection: ${BGN}Enabled${CL}"
|
||||||
[[ -n "${CT_TIMEZONE:-}" ]] && echo -e "${INFO}${BOLD}${DGN}Timezone: ${BGN}$CT_TIMEZONE${CL}"
|
[[ -n "${CT_TIMEZONE:-}" ]] && echo -e "${INFO}${BOLD}${DGN}Timezone: ${BGN}$CT_TIMEZONE${CL}"
|
||||||
[[ "$APT_CACHER" == "yes" ]] && echo -e "${INFO}${BOLD}${DGN}APT Cacher: ${BGN}$APT_CACHER_IP${CL}"
|
[[ "$APT_CACHER" == "yes" ]] && echo -e "${INFO}${BOLD}${DGN}APT Cacher: ${BGN}$APT_CACHER_IP${CL}"
|
||||||
|
[[ -n "${HTTP_PROXY:-}" ]] && echo -e "${INFO}${BOLD}${DGN}HTTP Proxy: ${BGN}$HTTP_PROXY${CL}"
|
||||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||||
echo -e "${CREATING}${BOLD}${RD}Creating an LXC of ${APP} using the above advanced settings${CL}"
|
echo -e "${CREATING}${BOLD}${RD}Creating an LXC of ${APP} using the above advanced settings${CL}"
|
||||||
|
|
||||||
@@ -3765,6 +3834,47 @@ start() {
|
|||||||
# SECTION 8: CONTAINER CREATION & DEPLOYMENT
|
# SECTION 8: CONTAINER CREATION & DEPLOYMENT
|
||||||
# ==============================================================================
|
# ==============================================================================
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# _apply_http_proxy_in_container()
|
||||||
|
#
|
||||||
|
# - Writes persistent proxy settings into the LXC before base package install
|
||||||
|
# - Ensures apt/apk/curl work behind corporate proxies during early setup
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
_apply_http_proxy_in_container() {
|
||||||
|
local proxy="${HTTP_PROXY:-}"
|
||||||
|
local noproxy="${HTTP_NO_PROXY:-}"
|
||||||
|
[[ -z "$proxy" || -z "${CTID:-}" ]] && return 0
|
||||||
|
[[ -z "$noproxy" ]] && noproxy="localhost,127.0.0.1,.local"
|
||||||
|
|
||||||
|
msg_info "Applying HTTP proxy in container"
|
||||||
|
local tmpf
|
||||||
|
tmpf="$(mktemp)"
|
||||||
|
cat >"$tmpf" <<EOF
|
||||||
|
export http_proxy="$proxy"
|
||||||
|
export https_proxy="$proxy"
|
||||||
|
export HTTP_PROXY="$proxy"
|
||||||
|
export HTTPS_PROXY="$proxy"
|
||||||
|
export no_proxy="$noproxy"
|
||||||
|
export NO_PROXY="$noproxy"
|
||||||
|
EOF
|
||||||
|
pct push "$CTID" "$tmpf" /etc/profile.d/90-http-proxy.sh >/dev/null 2>&1 || {
|
||||||
|
rm -f "$tmpf"
|
||||||
|
msg_warn "Failed to push HTTP proxy profile into container"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
pct exec "$CTID" -- chmod 644 /etc/profile.d/90-http-proxy.sh >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
if [[ "$var_os" != "alpine" && "${APT_CACHER:-}" != "yes" ]]; then
|
||||||
|
cat >"$tmpf" <<EOF
|
||||||
|
Acquire::http::Proxy "$proxy";
|
||||||
|
Acquire::https::Proxy "$proxy";
|
||||||
|
EOF
|
||||||
|
pct push "$CTID" "$tmpf" /etc/apt/apt.conf.d/95http-proxy >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
rm -f "$tmpf"
|
||||||
|
msg_ok "Applied HTTP proxy in container"
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# build_container()
|
# build_container()
|
||||||
#
|
#
|
||||||
@@ -3891,6 +4001,12 @@ build_container() {
|
|||||||
export SESSION_ID="$SESSION_ID"
|
export SESSION_ID="$SESSION_ID"
|
||||||
export CACHER="$APT_CACHER"
|
export CACHER="$APT_CACHER"
|
||||||
export CACHER_IP="$APT_CACHER_IP"
|
export CACHER_IP="$APT_CACHER_IP"
|
||||||
|
if [[ -n "${HTTP_PROXY:-}" ]]; then
|
||||||
|
export HTTP_PROXY HTTPS_PROXY="$HTTP_PROXY" http_proxy="$HTTP_PROXY" https_proxy="$HTTP_PROXY"
|
||||||
|
export NO_PROXY="${HTTP_NO_PROXY:-}" no_proxy="${HTTP_NO_PROXY:-}"
|
||||||
|
export var_http_proxy="$HTTP_PROXY"
|
||||||
|
export var_http_no_proxy="${HTTP_NO_PROXY:-}"
|
||||||
|
fi
|
||||||
export tz="$timezone"
|
export tz="$timezone"
|
||||||
export APPLICATION="$APP"
|
export APPLICATION="$APP"
|
||||||
export app="$NSAPP"
|
export app="$NSAPP"
|
||||||
@@ -4374,6 +4490,8 @@ EOF
|
|||||||
|
|
||||||
local install_exit_code=0
|
local install_exit_code=0
|
||||||
|
|
||||||
|
_apply_http_proxy_in_container
|
||||||
|
|
||||||
# Continue with standard container setup
|
# Continue with standard container setup
|
||||||
if [ "$var_os" == "alpine" ]; then
|
if [ "$var_os" == "alpine" ]; then
|
||||||
sleep 3
|
sleep 3
|
||||||
@@ -4381,10 +4499,13 @@ EOF
|
|||||||
https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
||||||
https://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
https://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
||||||
EOF'
|
EOF'
|
||||||
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses jq" >>"$BUILD_LOG" 2>&1 || {
|
pct exec "$CTID" -- ash -c 'set -a; [ -f /etc/profile.d/90-http-proxy.sh ] && . /etc/profile.d/90-http-proxy.sh; set +a; apk add bash newt curl openssh nano mc ncurses jq' >>"$BUILD_LOG" 2>&1 || {
|
||||||
msg_warn "apk install failed (dl-cdn.alpinelinux.org), trying alternate mirrors..."
|
msg_warn "apk install failed (dl-cdn.alpinelinux.org), trying alternate mirrors..."
|
||||||
local alpine_exit=0
|
local alpine_exit=0
|
||||||
pct exec "$CTID" -- ash -c '
|
pct exec "$CTID" -- ash -c '
|
||||||
|
set -a
|
||||||
|
[ -f /etc/profile.d/90-http-proxy.sh ] && . /etc/profile.d/90-http-proxy.sh
|
||||||
|
set +a
|
||||||
ALPINE_MIRRORS="mirror.init7.net ftp.halifax.rwth-aachen.de mirrors.edge.kernel.org alpine.mirror.wearetriple.com mirror.leaseweb.com uk.alpinelinux.org dl-2.alpinelinux.org dl-4.alpinelinux.org"
|
ALPINE_MIRRORS="mirror.init7.net ftp.halifax.rwth-aachen.de mirrors.edge.kernel.org alpine.mirror.wearetriple.com mirror.leaseweb.com uk.alpinelinux.org dl-2.alpinelinux.org dl-4.alpinelinux.org"
|
||||||
for m in $(printf "%s\n" $ALPINE_MIRRORS | shuf); do
|
for m in $(printf "%s\n" $ALPINE_MIRRORS | shuf); do
|
||||||
if wget -q --spider --timeout=2 "http://$m/alpine/latest-stable/main/" 2>/dev/null; then
|
if wget -q --spider --timeout=2 "http://$m/alpine/latest-stable/main/" 2>/dev/null; then
|
||||||
@@ -4443,13 +4564,16 @@ EOF
|
|||||||
pct exec "$CTID" -- bash -c "echo -e 'nameserver 8.8.8.8\nnameserver 1.1.1.1' >/etc/resolv.conf"
|
pct exec "$CTID" -- bash -c "echo -e 'nameserver 8.8.8.8\nnameserver 1.1.1.1' >/etc/resolv.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pct exec "$CTID" -- bash -c "apt-get update 2>&1 && apt-get install -y ${_base_pkgs} 2>&1" >>"$BUILD_LOG" 2>&1 || {
|
pct exec "$CTID" -- bash -c "set -a; [ -f /etc/profile.d/90-http-proxy.sh ] && . /etc/profile.d/90-http-proxy.sh; set +a; apt-get update 2>&1 && apt-get install -y ${_base_pkgs} 2>&1" >>"$BUILD_LOG" 2>&1 || {
|
||||||
local failed_mirror
|
local failed_mirror
|
||||||
failed_mirror=$(pct exec "$CTID" -- bash -c "grep -m1 -oP '(?<=URIs: https?://)[^/]+' /etc/apt/sources.list.d/debian.sources 2>/dev/null || grep -m1 -oP '(?<=deb https?://)[^/]+' /etc/apt/sources.list 2>/dev/null" 2>/dev/null || echo "unknown")
|
failed_mirror=$(pct exec "$CTID" -- bash -c "grep -m1 -oP '(?<=URIs: https?://)[^/]+' /etc/apt/sources.list.d/debian.sources 2>/dev/null || grep -m1 -oP '(?<=deb https?://)[^/]+' /etc/apt/sources.list 2>/dev/null" 2>/dev/null || echo "unknown")
|
||||||
msg_warn "apt-get update failed (${failed_mirror})."
|
msg_warn "apt-get update failed (${failed_mirror})."
|
||||||
msg_custom "ℹ️" "${YW}" "Probing alternate mirrors (this can take 1-2 minutes on network issues)"
|
msg_custom "ℹ️" "${YW}" "Probing alternate mirrors (this can take 1-2 minutes on network issues)"
|
||||||
local mirror_exit=0
|
local mirror_exit=0
|
||||||
pct exec "$CTID" -- env APT_BASE="$_base_pkgs" bash -c '
|
pct exec "$CTID" -- env APT_BASE="$_base_pkgs" bash -c '
|
||||||
|
set -a
|
||||||
|
[ -f /etc/profile.d/90-http-proxy.sh ] && . /etc/profile.d/90-http-proxy.sh
|
||||||
|
set +a
|
||||||
DISTRO=$(. /etc/os-release 2>/dev/null && echo "$ID" || echo "debian")
|
DISTRO=$(. /etc/os-release 2>/dev/null && echo "$ID" || echo "debian")
|
||||||
echo " Mirror fallback for distro: $DISTRO"
|
echo " Mirror fallback for distro: $DISTRO"
|
||||||
|
|
||||||
|
|||||||
@@ -970,6 +970,53 @@ is_verbose_mode() {
|
|||||||
[[ "$verbose" != "no" ]]
|
[[ "$verbose" != "no" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# configure_http_proxy()
|
||||||
|
#
|
||||||
|
# - Applies var_http_proxy / var_http_no_proxy inside the container
|
||||||
|
# - Persists proxy env for login shells, systemd, and package managers
|
||||||
|
# - Skips APT proxy config when APT Cacher-NG is active
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
configure_http_proxy() {
|
||||||
|
local proxy="${HTTP_PROXY:-${http_proxy:-${var_http_proxy:-}}}"
|
||||||
|
local noproxy="${HTTP_NO_PROXY:-${no_proxy:-${var_http_no_proxy:-}}}"
|
||||||
|
[[ -z "$proxy" ]] && return 0
|
||||||
|
[[ -z "$noproxy" ]] && noproxy="localhost,127.0.0.1,.local"
|
||||||
|
|
||||||
|
msg_info "Configuring HTTP proxy"
|
||||||
|
cat >/etc/profile.d/90-http-proxy.sh <<EOF
|
||||||
|
export http_proxy="$proxy"
|
||||||
|
export https_proxy="$proxy"
|
||||||
|
export HTTP_PROXY="$proxy"
|
||||||
|
export HTTPS_PROXY="$proxy"
|
||||||
|
export no_proxy="$noproxy"
|
||||||
|
export NO_PROXY="$noproxy"
|
||||||
|
EOF
|
||||||
|
chmod 644 /etc/profile.d/90-http-proxy.sh
|
||||||
|
|
||||||
|
if ! grep -q '^http_proxy=' /etc/environment 2>/dev/null; then
|
||||||
|
cat >>/etc/environment <<EOF
|
||||||
|
http_proxy=$proxy
|
||||||
|
https_proxy=$proxy
|
||||||
|
HTTP_PROXY=$proxy
|
||||||
|
HTTPS_PROXY=$proxy
|
||||||
|
no_proxy=$noproxy
|
||||||
|
NO_PROXY=$noproxy
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${CACHER:-}" != "yes" && -d /etc/apt/apt.conf.d ]]; then
|
||||||
|
cat >/etc/apt/apt.conf.d/95http-proxy <<EOF
|
||||||
|
Acquire::http::Proxy "$proxy";
|
||||||
|
Acquire::https::Proxy "$proxy";
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
export http_proxy="$proxy" https_proxy="$proxy" HTTP_PROXY="$proxy" HTTPS_PROXY="$proxy"
|
||||||
|
export no_proxy="$noproxy" NO_PROXY="$noproxy"
|
||||||
|
msg_ok "Configured HTTP proxy"
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# is_unattended()
|
# is_unattended()
|
||||||
#
|
#
|
||||||
|
|||||||
+3
-2
@@ -388,7 +388,8 @@ apt_update_safe() {
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
update_os() {
|
update_os() {
|
||||||
msg_info "Updating Container OS"
|
msg_info "Updating Container OS"
|
||||||
if [[ "$CACHER" == "yes" ]]; then
|
configure_http_proxy
|
||||||
|
if [[ "$CACHER" == "yes" && -z "${HTTP_PROXY:-${http_proxy:-}}" ]]; then
|
||||||
echo 'Acquire::http::Proxy-Auto-Detect "/usr/local/bin/apt-proxy-detect.sh";' >/etc/apt/apt.conf.d/00aptproxy
|
echo 'Acquire::http::Proxy-Auto-Detect "/usr/local/bin/apt-proxy-detect.sh";' >/etc/apt/apt.conf.d/00aptproxy
|
||||||
local _proxy_raw="${CACHER_IP}"
|
local _proxy_raw="${CACHER_IP}"
|
||||||
local _proxy_host _proxy_port _proxy_url
|
local _proxy_host _proxy_port _proxy_url
|
||||||
@@ -509,7 +510,7 @@ EOF
|
|||||||
systemctl restart "$(basename "$(dirname "$GETTY_OVERRIDE")" | sed 's/\.d//')"
|
systemctl restart "$(basename "$(dirname "$GETTY_OVERRIDE")" | sed 's/\.d//')"
|
||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
fi
|
fi
|
||||||
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo 'set -a; [ -f /etc/profile.d/90-http-proxy.sh ] && . /etc/profile.d/90-http-proxy.sh; set +a; bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/'"${app}"'.sh)"' >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
|
|
||||||
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user