mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-13 17:56:21 +01:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a28bf337b | ||
|
|
0ff308a706 | ||
|
|
fc4f8e2ac5 | ||
|
|
b107350c78 | ||
|
|
dd5be08eb4 | ||
|
|
d64c231777 | ||
|
|
e3bfc6e0c3 | ||
|
|
38be7c108b | ||
|
|
61c8c48915 | ||
|
|
0b345a0cda | ||
|
|
2fbbc9c185 |
No files matched your search
@@ -583,6 +583,14 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
## 2026-11-13
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- Bulwark ([#18656](https://github.com/community-scripts/ProxmoxVE/pull/18656))
|
||||
- Convex ([#18658](https://github.com/community-scripts/ProxmoxVE/pull/18658))
|
||||
- Chroma ([#18657](https://github.com/community-scripts/ProxmoxVE/pull/18657))
|
||||
- Bugsink ([#18655](https://github.com/community-scripts/ProxmoxVE/pull/18655))
|
||||
- 9Router ([#18654](https://github.com/community-scripts/ProxmoxVE/pull/18654))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- fetch the install script before the container is created [@MickLesk](https://github.com/MickLesk) ([core#236](https://github.com/community-scripts/core/pull/236))
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/decolua/9router
|
||||
|
||||
APP="9Router"
|
||||
var_tags="${var_tags:-ai;llm;gateway}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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 /usr/lib/node_modules/9router ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
CURRENT=$(jq -r '.version' /usr/lib/node_modules/9router/package.json)
|
||||
RELEASE=$(npm view 9router version)
|
||||
if [[ "$CURRENT" == "$RELEASE" ]]; then
|
||||
msg_ok "No update available: 9Router (${CURRENT})"
|
||||
exit
|
||||
fi
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
|
||||
msg_info "Stopping 9Router"
|
||||
systemctl stop 9router
|
||||
msg_ok "Stopped 9Router"
|
||||
|
||||
msg_info "Updating 9Router to ${RELEASE}"
|
||||
$STD npm install -g --ignore-scripts "9router@${RELEASE}"
|
||||
msg_ok "Updated 9Router to ${RELEASE}"
|
||||
|
||||
msg_info "Starting 9Router"
|
||||
systemctl start 9router
|
||||
msg_ok "Started 9Router"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:20128/dashboard${CL}"
|
||||
echo -e "${INFO}${YW}Dashboard password: INITIAL_PASSWORD in /opt/9router_data/.env (inside the container)${CL}"
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/bugsink/bugsink
|
||||
|
||||
APP="Bugsink"
|
||||
var_tags="${var_tags:-monitoring;error-tracking;sentry}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_email="${var_admin_email:-}"
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/bugsink ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "bugsink" "bugsink/bugsink"; then
|
||||
msg_info "Stopping Bugsink"
|
||||
systemctl stop bugsink bugsink-snappea
|
||||
msg_ok "Stopped Bugsink"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Updating Bugsink"
|
||||
$STD uv pip install --upgrade --python /opt/bugsink/.venv/bin/python "bugsink==${CHECK_UPDATE_RELEASE}"
|
||||
cd /opt/bugsink_data
|
||||
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate
|
||||
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate snappea --database=snappea
|
||||
cat <<EOF >~/.bugsink
|
||||
${CHECK_UPDATE_RELEASE}
|
||||
EOF
|
||||
msg_ok "Updated Bugsink"
|
||||
|
||||
msg_info "Starting Bugsink"
|
||||
systemctl start bugsink bugsink-snappea
|
||||
msg_ok "Started Bugsink"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:8000${CL}"
|
||||
echo -e "${INFO}${YW}Admin login: /opt/bugsink_data/.env (inside the container)${CL}"
|
||||
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/bulwarkmail/webmail
|
||||
|
||||
APP="Bulwark"
|
||||
var_tags="${var_tags:-mail;webmail;jmap}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_jmap_url="${var_jmap_url:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/bulwark ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "bulwark" "bulwarkmail/webmail"; then
|
||||
msg_info "Stopping Bulwark"
|
||||
systemctl stop bulwark
|
||||
msg_ok "Stopped Bulwark"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bulwark" "bulwarkmail/webmail" "prebuild" "latest" "/opt/bulwark" "bulwark-standalone-*-linux-$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Starting Bulwark"
|
||||
systemctl start bulwark
|
||||
msg_ok "Started Bulwark"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
echo -e "${INFO}${YW}Setup wizard token: journalctl -u bulwark (inside the container)${CL}"
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/chroma-core/chroma
|
||||
|
||||
APP="Chroma"
|
||||
var_tags="${var_tags:-database;vector;ai}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/chroma ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
CURRENT=$(cat ~/.chroma)
|
||||
RELEASE=$(curl -fsSL https://pypi.org/pypi/chromadb/json | jq -r '.info.version')
|
||||
if [[ "$CURRENT" == "$RELEASE" ]]; then
|
||||
msg_ok "No update available: Chroma (${CURRENT})"
|
||||
exit
|
||||
fi
|
||||
|
||||
msg_info "Stopping Chroma"
|
||||
systemctl stop chroma
|
||||
msg_ok "Stopped Chroma"
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Updating Chroma to ${RELEASE}"
|
||||
$STD uv pip install --upgrade --python /opt/chroma/.venv/bin/python "chromadb==${RELEASE}"
|
||||
cat <<EOF >~/.chroma
|
||||
${RELEASE}
|
||||
EOF
|
||||
msg_ok "Updated Chroma to ${RELEASE}"
|
||||
|
||||
msg_info "Starting Chroma"
|
||||
systemctl start chroma
|
||||
msg_ok "Started Chroma"
|
||||
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 "${GATEWAY}${BGN}http://${IP}:8000/docs${CL}"
|
||||
@@ -0,0 +1,58 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/get-convex/convex-backend
|
||||
|
||||
APP="Convex"
|
||||
var_tags="${var_tags:-backend;database;realtime}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
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/convex ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "convex" "get-convex/convex-backend"; then
|
||||
msg_info "Stopping Convex"
|
||||
systemctl stop convex
|
||||
msg_ok "Stopped Convex"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "convex" "get-convex/convex-backend" "prebuild" "latest" "/opt/convex" "convex-local-backend-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "convex-dashboard" "get-convex/convex-backend" "prebuild" "$(cat ~/.convex)" "/opt/convex-dashboard" "dashboard.zip"
|
||||
|
||||
msg_info "Starting Convex"
|
||||
systemctl start convex
|
||||
msg_ok "Started Convex"
|
||||
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 the dashboard using the following URL:${CL}"
|
||||
echo -e "${GATEWAY}${BGN}http://${IP}:6791${CL}"
|
||||
echo -e "${INFO}${YW}Deployment URL: http://${IP}:3210, admin key in /opt/convex_data/.env${CL}"
|
||||
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/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/simple-login/app
|
||||
|
||||
APP="SimpleLogin"
|
||||
var_tags="${var_tags:-email;privacy;alias}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-10}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
|
||||
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/simplelogin ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "simplelogin" "simple-login/app"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop simplelogin-webapp simplelogin-email simplelogin-job
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
create_backup /opt/simplelogin/.env \
|
||||
/opt/simplelogin/dkim \
|
||||
/opt/simplelogin/openid-rsa.key \
|
||||
/opt/simplelogin/openid-rsa.pub \
|
||||
/opt/simplelogin/uploads \
|
||||
/opt/simplelogin/.gnupg
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "simplelogin" "simple-login/app"
|
||||
|
||||
restore_backup
|
||||
grep -q '^METRICS_BACKENDS=' /opt/simplelogin/.env || echo "METRICS_BACKENDS=noop" >>/opt/simplelogin/.env
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
cd /opt/simplelogin
|
||||
$STD uv venv
|
||||
$STD uv pip install setuptools hatchling editables
|
||||
export CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
$STD uv sync --locked --no-dev --no-build-isolation --no-install-package newrelic
|
||||
if [[ -f /opt/simplelogin/static/package.json ]]; then
|
||||
cd /opt/simplelogin/static
|
||||
$STD npm ci
|
||||
fi
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Running Database Migrations"
|
||||
cd /opt/simplelogin
|
||||
$STD .venv/bin/alembic upgrade head
|
||||
msg_ok "Ran Database Migrations"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start simplelogin-webapp simplelogin-email simplelogin-job
|
||||
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 "${GATEWAY}${BGN}http://${IP}${CL}"
|
||||
@@ -0,0 +1,63 @@
|
||||
#!/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/decolua/9router
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
setup_ffmpeg
|
||||
|
||||
msg_info "Installing 9Router"
|
||||
$STD npm install -g --ignore-scripts "9router@${var_appversion:-latest}"
|
||||
msg_ok "Installed 9Router"
|
||||
|
||||
msg_info "Configuring 9Router"
|
||||
mkdir -p /opt/9router_data
|
||||
cat <<EOF >/opt/9router_data/.env
|
||||
DATA_DIR=/opt/9router_data
|
||||
PORT=20128
|
||||
HOSTNAME=0.0.0.0
|
||||
NODE_ENV=production
|
||||
NEXT_TELEMETRY_DISABLED=1
|
||||
BASE_URL=http://localhost:20128
|
||||
INITIAL_PASSWORD=$(random_password)
|
||||
JWT_SECRET=$(openssl rand -hex 32)
|
||||
API_KEY_SECRET=$(openssl rand -hex 32)
|
||||
MACHINE_ID_SALT=$(openssl rand -hex 16)
|
||||
EOF
|
||||
chmod 600 /opt/9router_data/.env
|
||||
msg_ok "Configured 9Router"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/9router.service
|
||||
[Unit]
|
||||
Description=9Router
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/usr/lib/node_modules/9router/app
|
||||
EnvironmentFile=/opt/9router_data/.env
|
||||
ExecStart=/usr/bin/node /usr/lib/node_modules/9router/app/custom-server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now 9router
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,86 @@
|
||||
#!/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/bugsink/bugsink
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Installing Bugsink"
|
||||
BUGSINK_VERSION="${var_appversion:-$(get_latest_github_release "bugsink/bugsink")}"
|
||||
$STD uv venv --python 3.12 /opt/bugsink/.venv
|
||||
$STD uv pip install --python /opt/bugsink/.venv/bin/python "bugsink==${BUGSINK_VERSION}"
|
||||
cat <<EOF >~/.bugsink
|
||||
${BUGSINK_VERSION}
|
||||
EOF
|
||||
msg_ok "Installed Bugsink"
|
||||
|
||||
msg_info "Configuring Bugsink"
|
||||
ADMIN_EMAIL="${var_admin_email:-admin@localhost}"
|
||||
ADMIN_PASS="${var_admin_pass:-$(random_password)}"
|
||||
mkdir -p /opt/bugsink_data
|
||||
cd /opt/bugsink_data
|
||||
$STD /opt/bugsink/.venv/bin/bugsink-create-conf --template=singleserver --host="${LOCAL_IP}" --base-dir=/opt/bugsink_data
|
||||
sed -i \
|
||||
-e "s|\"BASE_URL\": \"https://${LOCAL_IP}\"|\"BASE_URL\": \"http://${LOCAL_IP}:8000\"|" \
|
||||
-e 's|^SESSION_COOKIE_SECURE = True|SESSION_COOKIE_SECURE = False|' \
|
||||
-e 's|^CSRF_COOKIE_SECURE = True|CSRF_COOKIE_SECURE = False|' \
|
||||
-e 's|^USE_X_REAL_IP = True|USE_X_REAL_IP = False|' \
|
||||
/opt/bugsink_data/bugsink_conf.py
|
||||
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate
|
||||
$STD /opt/bugsink/.venv/bin/bugsink-manage migrate snappea --database=snappea
|
||||
DJANGO_SUPERUSER_PASSWORD="$ADMIN_PASS" $STD /opt/bugsink/.venv/bin/bugsink-manage createsuperuser --noinput --username "$ADMIN_EMAIL" --email "$ADMIN_EMAIL"
|
||||
cat <<EOF >/opt/bugsink_data/.env
|
||||
BUGSINK_ADMIN_EMAIL=${ADMIN_EMAIL}
|
||||
BUGSINK_ADMIN_PASSWORD=${ADMIN_PASS}
|
||||
EOF
|
||||
chmod 600 /opt/bugsink_data/.env /opt/bugsink_data/bugsink_conf.py
|
||||
msg_ok "Configured Bugsink"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<EOF >/etc/systemd/system/bugsink.service
|
||||
[Unit]
|
||||
Description=Bugsink
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
WorkingDirectory=/opt/bugsink_data
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
ExecStart=/opt/bugsink/.venv/bin/gunicorn --bind=0.0.0.0:8000 --workers=4 --max-requests=1000 --max-requests-jitter=100 --access-logfile - bugsink.wsgi
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
cat <<EOF >/etc/systemd/system/bugsink-snappea.service
|
||||
[Unit]
|
||||
Description=Bugsink Snappea
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/bugsink_data
|
||||
Environment=PYTHONUNBUFFERED=1
|
||||
ExecStart=/opt/bugsink/.venv/bin/bugsink-runsnappea
|
||||
Restart=always
|
||||
RuntimeMaxSec=1d
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now bugsink bugsink-snappea
|
||||
msg_ok "Created Services"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,60 @@
|
||||
#!/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/bulwarkmail/webmail
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "bulwark" "bulwarkmail/webmail" "prebuild" "latest" "/opt/bulwark" "bulwark-standalone-*-linux-$(arch_resolve).tar.gz"
|
||||
|
||||
msg_info "Configuring Bulwark"
|
||||
mkdir -p /opt/bulwark_data
|
||||
cat <<EOF >/opt/bulwark_data/.env
|
||||
NODE_ENV=production
|
||||
HOSTNAME=0.0.0.0
|
||||
PORT=3000
|
||||
JMAP_SERVER_URL=${var_jmap_url:-}
|
||||
COOKIE_SECURE=false
|
||||
ADMIN_CONFIG_DIR=/opt/bulwark_data/admin
|
||||
ADMIN_STATE_DIR=/opt/bulwark_data/admin-state
|
||||
SETTINGS_DATA_DIR=/opt/bulwark_data/settings
|
||||
PLUGIN_SECRETS_DIR=/opt/bulwark_data/plugin-secrets
|
||||
TELEMETRY_DATA_DIR=/opt/bulwark_data/telemetry
|
||||
VERSION_CHECK_DATA_DIR=/opt/bulwark_data/version-check
|
||||
EOF
|
||||
chmod 600 /opt/bulwark_data/.env
|
||||
msg_ok "Configured Bulwark"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/bulwark.service
|
||||
[Unit]
|
||||
Description=Bulwark Webmail
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/bulwark
|
||||
EnvironmentFile=/opt/bulwark_data/.env
|
||||
ExecStart=/usr/bin/node /opt/bulwark/server.js
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now bulwark
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,57 @@
|
||||
#!/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/chroma-core/chroma
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
CHROMA_VERSION="${var_appversion:-$(curl -fsSL https://pypi.org/pypi/chromadb/json | jq -r '.info.version')}"
|
||||
msg_info "Installing Chroma ${CHROMA_VERSION}"
|
||||
$STD uv venv --python 3.12 /opt/chroma/.venv
|
||||
$STD uv pip install --python /opt/chroma/.venv/bin/python "chromadb==${CHROMA_VERSION}"
|
||||
cat <<EOF >~/.chroma
|
||||
${CHROMA_VERSION}
|
||||
EOF
|
||||
msg_ok "Installed Chroma ${CHROMA_VERSION}"
|
||||
|
||||
msg_info "Configuring Chroma"
|
||||
mkdir -p /opt/chroma_data
|
||||
cat <<EOF >/opt/chroma_data/config.yaml
|
||||
persist_path: "/opt/chroma_data"
|
||||
listen_address: "0.0.0.0"
|
||||
port: 8000
|
||||
EOF
|
||||
msg_ok "Configured Chroma"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/chroma.service
|
||||
[Unit]
|
||||
Description=Chroma
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/chroma_data
|
||||
ExecStart=/opt/chroma/.venv/bin/chroma run /opt/chroma_data/config.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now chroma
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,88 @@
|
||||
#!/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/get-convex/convex-backend
|
||||
|
||||
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
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "convex" "get-convex/convex-backend" "prebuild" "latest" "/opt/convex" "convex-local-backend-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.zip"
|
||||
fetch_and_deploy_gh_release "convex-dashboard" "get-convex/convex-backend" "prebuild" "$(cat ~/.convex)" "/opt/convex-dashboard" "dashboard.zip"
|
||||
|
||||
msg_info "Configuring Convex"
|
||||
mkdir -p /opt/convex_data/storage /opt/convex_data/tmp
|
||||
INSTANCE_SECRET=$(openssl rand -hex 32)
|
||||
ADMIN_KEY=$(/opt/convex/convex-local-backend keygen admin-key --instance-name convex-self-hosted --instance-secret "$INSTANCE_SECRET")
|
||||
cat <<EOF >/opt/convex_data/.env
|
||||
INSTANCE_NAME=convex-self-hosted
|
||||
INSTANCE_SECRET=${INSTANCE_SECRET}
|
||||
CONVEX_SELF_HOSTED_ADMIN_KEY="${ADMIN_KEY}"
|
||||
CONVEX_CLOUD_ORIGIN=http://${LOCAL_IP}:3210
|
||||
CONVEX_SITE_ORIGIN=http://${LOCAL_IP}:3211
|
||||
TMPDIR=/opt/convex_data/tmp
|
||||
RUST_LOG=info
|
||||
DOCUMENT_RETENTION_DELAY=172800
|
||||
DISABLE_METRICS_ENDPOINT=true
|
||||
APPLICATION_MAX_CONCURRENT_MUTATIONS=16
|
||||
APPLICATION_MAX_CONCURRENT_QUERIES=16
|
||||
APPLICATION_MAX_CONCURRENT_V8_ACTIONS=16
|
||||
APPLICATION_MAX_CONCURRENT_NODE_ACTIONS=16
|
||||
EOF
|
||||
chmod 600 /opt/convex_data/.env
|
||||
msg_ok "Configured Convex"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<EOF >/etc/nginx/sites-available/convex-dashboard
|
||||
server {
|
||||
listen 6791;
|
||||
server_name _;
|
||||
root /opt/convex-dashboard;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri.html \$uri/ =404;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
nginx_enable_site "convex-dashboard"
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/convex.service
|
||||
[Unit]
|
||||
Description=Convex Backend
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/convex_data
|
||||
EnvironmentFile=/opt/convex_data/.env
|
||||
ExecStart=/opt/convex/convex-local-backend --instance-name \${INSTANCE_NAME} --instance-secret \${INSTANCE_SECRET} --port 3210 --site-proxy-port 3211 --convex-origin \${CONVEX_CLOUD_ORIGIN} --convex-site \${CONVEX_SITE_ORIGIN} --local-storage /opt/convex_data/storage /opt/convex_data/db.sqlite3
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=10
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now convex
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -0,0 +1,230 @@
|
||||
#!/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/simple-login/app
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
echo "postfix postfix/mailname string $(hostname -f)" | debconf-set-selections
|
||||
echo "postfix postfix/main_mailer_type string Internet Site" | debconf-set-selections
|
||||
$STD apt install -y \
|
||||
build-essential \
|
||||
libre2-dev \
|
||||
pkg-config \
|
||||
libpq-dev \
|
||||
cmake \
|
||||
ninja-build \
|
||||
clang \
|
||||
redis-server \
|
||||
nginx \
|
||||
postfix \
|
||||
postfix-pgsql \
|
||||
opendkim-tools
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
APPLICATION="simplelogin" PG_DB_NAME="simplelogin" PG_DB_USER="simplelogin" setup_postgresql_db
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
|
||||
fetch_and_deploy_gh_release "simplelogin" "simple-login/app"
|
||||
|
||||
msg_info "Installing SimpleLogin (Patience)"
|
||||
cd /opt/simplelogin
|
||||
$STD uv venv
|
||||
$STD uv pip install setuptools hatchling editables
|
||||
export CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||
$STD uv sync --locked --no-dev --no-build-isolation --no-install-package newrelic
|
||||
if [[ -f /opt/simplelogin/static/package.json ]]; then
|
||||
cd /opt/simplelogin/static
|
||||
$STD npm ci
|
||||
fi
|
||||
msg_ok "Installed SimpleLogin"
|
||||
|
||||
msg_info "Configuring SimpleLogin"
|
||||
FLASK_SECRET=$(openssl rand -hex 32)
|
||||
|
||||
mkdir -p /opt/simplelogin/dkim
|
||||
$STD openssl genrsa -traditional -out /opt/simplelogin/dkim/dkim.private 2048
|
||||
$STD openssl rsa -in /opt/simplelogin/dkim/dkim.private -pubout -out /opt/simplelogin/dkim/dkim.public.key
|
||||
DKIM_PUB=$(openssl rsa -in /opt/simplelogin/dkim/dkim.private -pubout 2>/dev/null | grep -v '^-----' | tr -d '\n')
|
||||
cat <<EOF >/opt/simplelogin/dkim/dkim.dns.txt
|
||||
dkim._domainkey.EMAIL_DOMAIN. IN TXT ( "v=DKIM1; k=rsa; p=${DKIM_PUB}" )
|
||||
EOF
|
||||
$STD openssl genrsa -out /opt/simplelogin/openid-rsa.key 2048
|
||||
$STD openssl rsa -in /opt/simplelogin/openid-rsa.key -pubout -out /opt/simplelogin/openid-rsa.pub
|
||||
|
||||
mkdir -p /opt/simplelogin/uploads /opt/simplelogin/.gnupg
|
||||
chmod 700 /opt/simplelogin/.gnupg
|
||||
|
||||
{
|
||||
echo "URL=http://${LOCAL_IP}"
|
||||
echo "EMAIL_DOMAIN=example.com"
|
||||
echo "SUPPORT_EMAIL=support@example.com"
|
||||
echo 'EMAIL_SERVERS_WITH_PRIORITY=[(10, "localhost.")]'
|
||||
echo "POSTFIX_SERVER=localhost"
|
||||
echo "DB_URI=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
|
||||
echo "FLASK_SECRET=${FLASK_SECRET}"
|
||||
echo "DKIM_PRIVATE_KEY_PATH=/opt/simplelogin/dkim/dkim.private"
|
||||
echo "GNUPGHOME=/opt/simplelogin/.gnupg"
|
||||
echo "LOCAL_FILE_UPLOAD=true"
|
||||
echo "UPLOAD_DIR=/opt/simplelogin/uploads"
|
||||
echo "DISABLE_ALIAS_SUFFIX=1"
|
||||
echo "WORDS_FILE_PATH=/opt/simplelogin/local_data/words.txt"
|
||||
echo "NAMESERVERS=1.1.1.1"
|
||||
echo "MEM_STORE_URI=redis://localhost:6379/1"
|
||||
echo "OPENID_PRIVATE_KEY_PATH=/opt/simplelogin/openid-rsa.key"
|
||||
echo "OPENID_PUBLIC_KEY_PATH=/opt/simplelogin/openid-rsa.pub"
|
||||
echo "METRICS_BACKENDS=noop"
|
||||
} >/opt/simplelogin/.env
|
||||
|
||||
cd /opt/simplelogin
|
||||
export FLASK_APP=server
|
||||
export URL="http://${LOCAL_IP}"
|
||||
export EMAIL_DOMAIN="example.com"
|
||||
export SUPPORT_EMAIL="support@example.com"
|
||||
export EMAIL_SERVERS_WITH_PRIORITY='[(10, "localhost.")]'
|
||||
export POSTFIX_SERVER="localhost"
|
||||
export DB_URI="postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost/${PG_DB_NAME}"
|
||||
export FLASK_SECRET="${FLASK_SECRET}"
|
||||
export DKIM_PRIVATE_KEY_PATH="/opt/simplelogin/dkim/dkim.private"
|
||||
export GNUPGHOME="/opt/simplelogin/.gnupg"
|
||||
export LOCAL_FILE_UPLOAD="true"
|
||||
export UPLOAD_DIR="/opt/simplelogin/uploads"
|
||||
export DISABLE_ALIAS_SUFFIX="1"
|
||||
export WORDS_FILE_PATH="/opt/simplelogin/local_data/words.txt"
|
||||
export NAMESERVERS="1.1.1.1"
|
||||
export MEM_STORE_URI="redis://localhost:6379/1"
|
||||
export OPENID_PRIVATE_KEY_PATH="/opt/simplelogin/openid-rsa.key"
|
||||
export OPENID_PUBLIC_KEY_PATH="/opt/simplelogin/openid-rsa.pub"
|
||||
export METRICS_BACKENDS="noop"
|
||||
$STD .venv/bin/alembic upgrade head
|
||||
$STD .venv/bin/python init_app.py
|
||||
msg_ok "Configured SimpleLogin"
|
||||
|
||||
msg_info "Configuring Postfix"
|
||||
cat <<EOF >/etc/postfix/pgsql-relay-domains.cf
|
||||
hosts = localhost
|
||||
dbname = ${PG_DB_NAME}
|
||||
user = ${PG_DB_USER}
|
||||
password = ${PG_DB_PASS}
|
||||
query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true
|
||||
EOF
|
||||
|
||||
cat <<EOF >/etc/postfix/pgsql-transport-maps.cf
|
||||
hosts = localhost
|
||||
dbname = ${PG_DB_NAME}
|
||||
user = ${PG_DB_USER}
|
||||
password = ${PG_DB_PASS}
|
||||
query = SELECT 'smtp:[127.0.0.1]:20381' FROM custom_domain WHERE domain='%s' AND verified=true
|
||||
EOF
|
||||
|
||||
chmod 640 /etc/postfix/pgsql-*.cf
|
||||
|
||||
cat <<EOF >/etc/postfix/transport
|
||||
example.com smtp:[127.0.0.1]:20381
|
||||
EOF
|
||||
$STD postmap /etc/postfix/transport
|
||||
|
||||
postconf -e "relay_domains = example.com, pgsql:/etc/postfix/pgsql-relay-domains.cf"
|
||||
postconf -e "transport_maps = hash:/etc/postfix/transport, pgsql:/etc/postfix/pgsql-transport-maps.cf"
|
||||
postconf -e "smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination"
|
||||
postconf -e "inet_protocols = ipv4"
|
||||
$STD systemctl restart postfix
|
||||
msg_ok "Configured Postfix"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<'EOF' >/etc/systemd/system/simplelogin-webapp.service
|
||||
[Unit]
|
||||
Description=SimpleLogin Web Application
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Requires=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/simplelogin
|
||||
EnvironmentFile=/opt/simplelogin/.env
|
||||
ExecStart=/opt/simplelogin/.venv/bin/gunicorn wsgi:app -b 127.0.0.1:7777 -w 2 --timeout 120
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<'EOF' >/etc/systemd/system/simplelogin-email.service
|
||||
[Unit]
|
||||
Description=SimpleLogin Email Handler
|
||||
After=network.target postgresql.service redis-server.service postfix.service
|
||||
Requires=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/simplelogin
|
||||
EnvironmentFile=/opt/simplelogin/.env
|
||||
ExecStart=/opt/simplelogin/.venv/bin/python email_handler.py
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<'EOF' >/etc/systemd/system/simplelogin-job.service
|
||||
[Unit]
|
||||
Description=SimpleLogin Job Runner
|
||||
After=network.target postgresql.service redis-server.service
|
||||
Requires=postgresql.service redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/simplelogin
|
||||
EnvironmentFile=/opt/simplelogin/.env
|
||||
ExecStart=/opt/simplelogin/.venv/bin/python job_runner.py
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable -q --now redis-server simplelogin-webapp simplelogin-email simplelogin-job
|
||||
msg_ok "Created Services"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<'EOF' >/etc/nginx/sites-available/simplelogin.conf
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
client_max_body_size 10M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:7777;
|
||||
proxy_http_version 1.1;
|
||||
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;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -sf /etc/nginx/sites-available/simplelogin.conf /etc/nginx/sites-enabled/
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD nginx -t
|
||||
$STD systemctl enable --now nginx
|
||||
$STD systemctl reload nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in new issue
Block a user