mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-07 22:10:16 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 88bdc9f63a |
-27
@@ -1,27 +0,0 @@
|
||||
name: Check Script Repo URL
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "ct/**"
|
||||
- "install/**"
|
||||
- "vm/**"
|
||||
- "tools/**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check:
|
||||
if: github.repository == 'community-scripts/ProxmoxVE'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Reject DevScripts URLs
|
||||
run: |
|
||||
if grep -rnE 'community-scripts/(ProxmoxVED|DevScripts)/' ct install vm tools; then
|
||||
echo "::error::These lines point at DevScripts, so telemetry files the runs there. Use community-scripts/ProxmoxVE."
|
||||
exit 1
|
||||
fi
|
||||
+1
-30
@@ -571,40 +571,11 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-11-07
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 💥 Breaking Changes
|
||||
|
||||
- fix: gotenberg: update to v9 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#18491](https://github.com/community-scripts/ProxmoxVE/pull/18491))
|
||||
|
||||
## 2026-11-06
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- UmbrelOS-VM: report runs as ProxmoxVE, not DevScripts [@MickLesk](https://github.com/MickLesk) ([#18497](https://github.com/community-scripts/ProxmoxVE/pull/18497))
|
||||
- Caddy: skip the xCaddy test build below 2 GB RAM [@MickLesk](https://github.com/MickLesk) ([#18472](https://github.com/community-scripts/ProxmoxVE/pull/18472))
|
||||
- Thingsboard: keep the package defaults in thingsboard.conf [@MickLesk](https://github.com/MickLesk) ([#18499](https://github.com/community-scripts/ProxmoxVE/pull/18499))
|
||||
- Nexterm: keep the extracted app out of the /tmp cleanup [@MickLesk](https://github.com/MickLesk) ([#18501](https://github.com/community-scripts/ProxmoxVE/pull/18501))
|
||||
- PLANKA: run the service with node instead of nodemon [@MickLesk](https://github.com/MickLesk) ([#18503](https://github.com/community-scripts/ProxmoxVE/pull/18503))
|
||||
- MeTube/Yubal: install Deno without its shell setup [@MickLesk](https://github.com/MickLesk) ([#18406](https://github.com/community-scripts/ProxmoxVE/pull/18406))
|
||||
- OPNsense VM: size the temp space check to the unpacked image | say why the EFI disk could not be allocated [@MickLesk](https://github.com/MickLesk) ([#18404](https://github.com/community-scripts/ProxmoxVE/pull/18404))
|
||||
|
||||
- #### 🔧 Refactor
|
||||
|
||||
- Technitium DNS: read the version from its GitHub releases [@MickLesk](https://github.com/MickLesk) ([#18425](https://github.com/community-scripts/ProxmoxVE/pull/18425))
|
||||
|
||||
### 💾 Core
|
||||
|
||||
- fix: spot same-filesystem bind mounts on Alpine [@rcourtman](https://github.com/rcourtman) ([core#212](https://github.com/community-scripts/core/pull/212))
|
||||
- fix: report a container that went down during setup, keep finished installs [@MickLesk](https://github.com/MickLesk) ([core#211](https://github.com/community-scripts/core/pull/211))
|
||||
|
||||
### 📚 Documentation
|
||||
|
||||
- ci: reject DevScripts URLs in scripts [@MickLesk](https://github.com/MickLesk) ([#18498](https://github.com/community-scripts/ProxmoxVE/pull/18498))
|
||||
- fix: report a container that went down during setup, keep finished installs [@MickLesk](https://github.com/MickLesk) ([core#211](https://github.com/community-scripts/core/pull/211))
|
||||
|
||||
## 2026-11-05
|
||||
|
||||
|
||||
+3
-7
@@ -55,13 +55,9 @@ update_deb_based() {
|
||||
setup_go
|
||||
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
|
||||
|
||||
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
|
||||
msg_warn "xCaddy updated; its test build was skipped because linking Caddy needs about 2 GB RAM"
|
||||
else
|
||||
msg_info "Updating xCaddy"
|
||||
$STD xcaddy build
|
||||
msg_ok "Updated xCaddy"
|
||||
fi
|
||||
msg_info "Updating xCaddy"
|
||||
$STD xcaddy build
|
||||
msg_ok "Updated xCaddy"
|
||||
fi
|
||||
fi
|
||||
msg_ok "Updated successfully!"
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ function update_script() {
|
||||
source ~/.bashrc
|
||||
if ! command -v deno &>/dev/null; then
|
||||
export DENO_INSTALL="/usr/local"
|
||||
curl -fsSL https://deno.land/install.sh | CI=1 $STD sh -s
|
||||
curl -fsSL https://deno.land/install.sh | $STD sh -s -- -y
|
||||
else
|
||||
$STD deno upgrade
|
||||
fi
|
||||
|
||||
@@ -31,8 +31,6 @@ function update_script() {
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "x /tmp/nexterm-sea-*" >/etc/tmpfiles.d/nexterm.conf
|
||||
|
||||
if check_for_gh_release "nexterm-engine" "gnmyt/Nexterm"; then
|
||||
msg_info "Stopping nexterm-engine"
|
||||
systemctl stop nexterm-engine
|
||||
@@ -48,7 +46,6 @@ function update_script() {
|
||||
if check_for_gh_release "nexterm-server" "gnmyt/Nexterm"; then
|
||||
msg_info "Stopping nexterm-server"
|
||||
systemctl stop nexterm-server
|
||||
rm -rf /tmp/nexterm-sea-*
|
||||
msg_ok "Stopped nexterm-server"
|
||||
|
||||
fetch_and_deploy_gh_release "nexterm-server" "gnmyt/Nexterm" "singlefile" "latest" "/opt/nexterm/server" "nexterm-server-linux-$(arch_resolve "x64" "arm64")"
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
#!/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://pixelfed.org/
|
||||
|
||||
APP="Pixelfed"
|
||||
var_tags="${var_tags:-fediverse;social}"
|
||||
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}"
|
||||
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/pixelfed ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "pixelfed" "pixelfed/pixelfed"; then
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop pixelfed-horizon pixelfed-scheduler.timer
|
||||
msg_ok "Services stopped"
|
||||
|
||||
create_backup /opt/pixelfed/.env \
|
||||
/opt/pixelfed/storage
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pixelfed" "pixelfed/pixelfed" "tarball" "latest" "/opt/pixelfed"
|
||||
|
||||
restore_backup
|
||||
|
||||
msg_info "Updating Pixelfed"
|
||||
cd /opt/pixelfed
|
||||
chmod -R 755 /opt/pixelfed
|
||||
chmod -R 775 /opt/pixelfed/storage /opt/pixelfed/bootstrap/cache
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev --no-ansi --no-interaction --optimize-autoloader
|
||||
chown -R pixelfed:pixelfed /opt/pixelfed
|
||||
$STD sudo -u pixelfed php artisan storage:link
|
||||
$STD sudo -u pixelfed php artisan migrate --force
|
||||
$STD sudo -u pixelfed php artisan route:cache
|
||||
$STD sudo -u pixelfed php artisan view:cache
|
||||
$STD sudo -u pixelfed php artisan config:cache
|
||||
$STD sudo -u pixelfed php artisan horizon:publish
|
||||
msg_ok "Updated Pixelfed"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start pixelfed-horizon pixelfed-scheduler.timer
|
||||
msg_ok "Services started"
|
||||
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}"
|
||||
echo -e "${INFO}${YW} Create an admin account with:${CL}"
|
||||
echo -e "${TAB}cd /opt/pixelfed && sudo -u pixelfed php artisan user:create"
|
||||
+2
-9
@@ -30,15 +30,6 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! grep -q "^Environment=HOME=" /etc/systemd/system/planka.service; then
|
||||
msg_info "Updating Service"
|
||||
sed -i -e '/^Environment=NODE_ENV=/d' -e 's|^ExecStart=.*|Environment=NODE_ENV=production\nEnvironment=HOME=/root\nExecStart=/usr/bin/node app.js --prod|' /etc/systemd/system/planka.service
|
||||
systemctl daemon-reload
|
||||
systemctl restart planka
|
||||
msg_ok "Updated Service"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "planka" "plankanban/planka"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop planka
|
||||
@@ -89,6 +80,8 @@ function update_script() {
|
||||
msg_ok "Migrated Database"
|
||||
|
||||
msg_info "Starting Service"
|
||||
sed -i 's|ExecStart=/usr/bin/npm start --prod$|ExecStart=/usr/bin/npm start --production|' /etc/systemd/system/planka.service
|
||||
systemctl daemon-reload
|
||||
systemctl start planka
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ function update_script() {
|
||||
$STD apt install -y aspnetcore-runtime-10.0
|
||||
fi
|
||||
|
||||
RELEASE=$(get_latest_github_release "TechnitiumSoftware/DnsServer")
|
||||
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
|
||||
if [[ ! -f ~/.technitium || ${RELEASE} != "$(cat ~/.technitium 2>/dev/null)" ]]; then
|
||||
fetch_and_deploy_from_url "https://download.technitium.com/dns/DnsServerPortable.tar.gz" /opt/technitium/dns
|
||||
echo "${RELEASE}" >~/.technitium
|
||||
|
||||
+1
-19
@@ -31,30 +31,12 @@ function update_script() {
|
||||
fi
|
||||
|
||||
JAVA_VERSION="25" setup_java
|
||||
|
||||
if ! grep -q "install.data_dir" /etc/thingsboard/conf/thingsboard.conf; then
|
||||
msg_info "Restoring Package Defaults"
|
||||
cat <<'EOF' >>/etc/thingsboard/conf/thingsboard.conf
|
||||
|
||||
export JAVA_OPTS="$JAVA_OPTS -Dplatform=deb -Dinstall.data_dir=/usr/share/thingsboard/data"
|
||||
export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=/var/log/thingsboard/gc.log:time,uptime,level,tags:filecount=10,filesize=10M"
|
||||
export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError"
|
||||
export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark"
|
||||
export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10"
|
||||
export LOG_FILENAME=thingsboard.out
|
||||
export LOADER_PATH=/usr/share/thingsboard/conf,/usr/share/thingsboard/extensions
|
||||
export SQL_DATA_FOLDER=/usr/share/thingsboard/data/sql
|
||||
EOF
|
||||
systemctl restart thingsboard
|
||||
msg_ok "Restored Package Defaults"
|
||||
fi
|
||||
|
||||
if check_for_gh_release "thingsboard" "thingsboard/thingsboard"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop thingsboard
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
DPKG_FORCE_CONFOLD=1 fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb"
|
||||
fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb"
|
||||
|
||||
msg_info "Running Database Upgrade"
|
||||
$STD /usr/share/thingsboard/bin/install/upgrade.sh
|
||||
|
||||
@@ -23,15 +23,10 @@ setup_deb_based() {
|
||||
setup_go
|
||||
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "binary"
|
||||
|
||||
msg_info "Setup xCaddy"
|
||||
$STD apt install -y git
|
||||
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
|
||||
msg_warn "xCaddy is installed; its test build was skipped because linking Caddy needs about 2 GB RAM"
|
||||
else
|
||||
msg_info "Setup xCaddy"
|
||||
cd /opt
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
fi
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -74,14 +69,10 @@ EOF
|
||||
GO_VERSION="$(curl -fsSL https://go.dev/VERSION?m=text | head -1 | cut -c3-)" setup_go
|
||||
fetch_and_deploy_gh_release "xcaddy" "caddyserver/xcaddy" "prebuild" "latest" "/opt/xcaddy" "xcaddy_*_linux_$(arch_resolve).tar.gz"
|
||||
ln -sf /opt/xcaddy/xcaddy /usr/local/bin/xcaddy
|
||||
if (($(awk '/^MemTotal:/ {print int($2 / 1024)}' /proc/meminfo) < 1900)); then
|
||||
msg_warn "xCaddy is installed; its test build was skipped because linking Caddy needs about 2 GB RAM"
|
||||
else
|
||||
msg_info "Setup xCaddy"
|
||||
cd /opt
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
fi
|
||||
msg_info "Setup xCaddy"
|
||||
cd /opt
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
fi
|
||||
|
||||
msg_info "Enabling Caddy Service"
|
||||
|
||||
@@ -26,7 +26,7 @@ NODE_VERSION="24" NODE_MODULE="corepack,pnpm" setup_nodejs
|
||||
|
||||
msg_info "Installing Deno"
|
||||
export DENO_INSTALL="/usr/local"
|
||||
curl -fsSL https://deno.land/install.sh | CI=1 $STD sh -s
|
||||
curl -fsSL https://deno.land/install.sh | $STD sh -s -- -y
|
||||
[[ ":$PATH:" != *":/usr/local/bin:"* ]] &&
|
||||
echo -e "\nexport PATH=\"/usr/local/bin:\$PATH\"" >>~/.bashrc &&
|
||||
source ~/.bashrc
|
||||
|
||||
@@ -33,7 +33,6 @@ LOCAL_ENGINE_TOKEN=${LOCAL_ENGINE_TOKEN}
|
||||
ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
||||
EOF
|
||||
chmod 0640 /etc/nexterm-engine/config.yaml /etc/nexterm-server/server.env
|
||||
echo "x /tmp/nexterm-sea-*" >/etc/tmpfiles.d/nexterm.conf
|
||||
msg_ok "Configured Nexterm"
|
||||
|
||||
msg_info "Creating Services"
|
||||
|
||||
@@ -1,236 +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://pixelfed.org/
|
||||
|
||||
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 \
|
||||
redis-server \
|
||||
ffmpeg \
|
||||
jpegoptim \
|
||||
optipng \
|
||||
pngquant \
|
||||
gifsicle \
|
||||
libvips42
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Creating Pixelfed User"
|
||||
useradd -rU -s /bin/bash pixelfed
|
||||
usermod -aG redis pixelfed
|
||||
msg_ok "Created Pixelfed User"
|
||||
|
||||
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="pixelfed" PG_DB_USER="pixelfed" setup_postgresql_db
|
||||
PHP_VERSION="8.4" PHP_FPM="YES" PHP_MODULE="bcmath,ctype,curl,exif,gd,imagick,intl,mbstring,pgsql,redis,xml,zip" PHP_UPLOAD_MAX_FILESIZE="500M" PHP_POST_MAX_SIZE="500M" PHP_MAX_EXECUTION_TIME="600" setup_php
|
||||
setup_composer
|
||||
|
||||
msg_info "Configuring Redis"
|
||||
REDIS_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
sed -i "s/^# requirepass foobared/requirepass $REDIS_PASS/" /etc/redis/redis.conf
|
||||
sed -i "s/^requirepass .*/requirepass $REDIS_PASS/" /etc/redis/redis.conf
|
||||
systemctl restart redis-server
|
||||
msg_ok "Configured Redis"
|
||||
|
||||
msg_info "Configuring PHP-FPM Pool"
|
||||
cp /etc/php/8.4/fpm/pool.d/www.conf /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
sed -i 's/\[www\]/[pixelfed]/' /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
sed -i 's/^user = www-data/user = pixelfed/' /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
sed -i 's/^group = www-data/group = pixelfed/' /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
sed -i 's|^listen = .*|listen = /run/php/php8.4-fpm-pixelfed.sock|' /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
sed -i 's/^listen.owner = .*/listen.owner = www-data/' /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
sed -i 's/^listen.group = .*/listen.group = www-data/' /etc/php/8.4/fpm/pool.d/pixelfed.conf
|
||||
systemctl restart php8.4-fpm
|
||||
msg_ok "Configured PHP-FPM Pool"
|
||||
|
||||
fetch_and_deploy_gh_release "pixelfed" "pixelfed/pixelfed" "tarball" "latest" "/opt/pixelfed"
|
||||
|
||||
msg_info "Installing Pixelfed (Patience)"
|
||||
cd /opt/pixelfed
|
||||
cat <<EOF >/opt/pixelfed/.env
|
||||
APP_NAME="Pixelfed"
|
||||
APP_ENV="production"
|
||||
APP_KEY=
|
||||
APP_DEBUG="false"
|
||||
APP_URL=http://${LOCAL_IP}
|
||||
APP_DOMAIN=${LOCAL_IP}
|
||||
ADMIN_DOMAIN=${LOCAL_IP}
|
||||
SESSION_DOMAIN=${LOCAL_IP}
|
||||
TRUST_PROXIES="*"
|
||||
FORCE_HTTPS_URLS="false"
|
||||
|
||||
OPEN_REGISTRATION="false"
|
||||
ENFORCE_EMAIL_VERIFICATION="false"
|
||||
PF_MAX_USERS="1000"
|
||||
OAUTH_ENABLED="true"
|
||||
ENABLE_CONFIG_CACHE="true"
|
||||
INSTANCE_DISCOVER_PUBLIC="true"
|
||||
|
||||
PF_OPTIMIZE_IMAGES="true"
|
||||
IMAGE_QUALITY="80"
|
||||
MAX_PHOTO_SIZE="15000"
|
||||
MAX_CAPTION_LENGTH="500"
|
||||
MAX_ALBUM_LENGTH="4"
|
||||
|
||||
DB_CONNECTION="pgsql"
|
||||
DB_HOST="127.0.0.1"
|
||||
DB_PORT="5432"
|
||||
DB_DATABASE="${PG_DB_NAME}"
|
||||
DB_USERNAME="${PG_DB_USER}"
|
||||
DB_PASSWORD="${PG_DB_PASS}"
|
||||
|
||||
REDIS_CLIENT="predis"
|
||||
REDIS_SCHEME="tcp"
|
||||
REDIS_HOST="127.0.0.1"
|
||||
REDIS_PASSWORD="${REDIS_PASS}"
|
||||
REDIS_PORT="6379"
|
||||
|
||||
SESSION_DRIVER="database"
|
||||
CACHE_DRIVER="redis"
|
||||
QUEUE_DRIVER="redis"
|
||||
BROADCAST_DRIVER="log"
|
||||
LOG_CHANNEL="stack"
|
||||
HORIZON_PREFIX="horizon-"
|
||||
|
||||
ACTIVITY_PUB="true"
|
||||
AP_REMOTE_FOLLOW="true"
|
||||
AP_INBOX="true"
|
||||
AP_OUTBOX="true"
|
||||
AP_SHAREDINBOX="true"
|
||||
|
||||
EXP_EMC="true"
|
||||
|
||||
MAIL_DRIVER="log"
|
||||
MAIL_HOST="smtp.mailtrap.io"
|
||||
MAIL_PORT="2525"
|
||||
MAIL_USERNAME="null"
|
||||
MAIL_PASSWORD="null"
|
||||
MAIL_ENCRYPTION="null"
|
||||
MAIL_FROM_ADDRESS="pixelfed@example.com"
|
||||
MAIL_FROM_NAME="Pixelfed"
|
||||
|
||||
PF_ENABLE_CLOUD="false"
|
||||
FILESYSTEM_CLOUD="s3"
|
||||
SESSION_SECURE_COOKIE="false"
|
||||
HTTPS="false"
|
||||
EOF
|
||||
chmod -R 755 /opt/pixelfed
|
||||
chmod -R 775 /opt/pixelfed/storage /opt/pixelfed/bootstrap/cache
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev --no-ansi --no-interaction --optimize-autoloader
|
||||
$STD php artisan key:generate --force
|
||||
$STD php artisan storage:link
|
||||
$STD php artisan migrate --force
|
||||
$STD php artisan import:cities
|
||||
$STD php artisan passport:keys
|
||||
$STD php artisan route:cache
|
||||
$STD php artisan view:cache
|
||||
$STD php artisan config:cache
|
||||
$STD php artisan instance:actor
|
||||
$STD php artisan horizon:install
|
||||
chown -R pixelfed:pixelfed /opt/pixelfed
|
||||
msg_ok "Installed Pixelfed"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<'EOF' >/etc/nginx/sites-available/pixelfed
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /opt/pixelfed/public;
|
||||
index index.php;
|
||||
|
||||
charset utf-8;
|
||||
client_max_body_size 100M;
|
||||
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header X-Content-Type-Options "nosniff";
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/run/php/php8.4-fpm-pixelfed.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -sf /etc/nginx/sites-available/pixelfed /etc/nginx/sites-enabled/pixelfed
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD nginx -t
|
||||
systemctl reload nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
msg_info "Creating Services"
|
||||
cat <<'EOF' >/etc/systemd/system/pixelfed-horizon.service
|
||||
[Unit]
|
||||
Description=Pixelfed Horizon Queue Worker
|
||||
After=network.target redis-server.service postgresql.service
|
||||
Requires=redis-server.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=pixelfed
|
||||
WorkingDirectory=/opt/pixelfed
|
||||
ExecStart=/usr/bin/php /opt/pixelfed/artisan horizon
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
cat <<'EOF' >/etc/systemd/system/pixelfed-scheduler.service
|
||||
[Unit]
|
||||
Description=Pixelfed Task Scheduler
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=pixelfed
|
||||
WorkingDirectory=/opt/pixelfed
|
||||
ExecStart=/usr/bin/php /opt/pixelfed/artisan schedule:run
|
||||
EOF
|
||||
|
||||
cat <<'EOF' >/etc/systemd/system/pixelfed-scheduler.timer
|
||||
[Unit]
|
||||
Description=Run Pixelfed Scheduler every minute
|
||||
|
||||
[Timer]
|
||||
OnCalendar=*-*-* *:*:00
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
EOF
|
||||
systemctl enable -q --now pixelfed-horizon pixelfed-scheduler.timer
|
||||
msg_ok "Created Services"
|
||||
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -70,9 +70,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/opt/planka
|
||||
Environment=NODE_ENV=production
|
||||
Environment=HOME=/root
|
||||
ExecStart=/usr/bin/node app.js --prod
|
||||
ExecStart=/usr/bin/npm start --production
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
|
||||
@@ -23,7 +23,7 @@ setup_deb822_repo \
|
||||
$STD apt install -y aspnetcore-runtime-10.0
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
RELEASE=$(get_latest_github_release "TechnitiumSoftware/DnsServer")
|
||||
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
|
||||
fetch_and_deploy_from_url "https://download.technitium.com/dns/DnsServerPortable.tar.gz" /opt/technitium/dns
|
||||
echo "${RELEASE}" >~/.technitium
|
||||
|
||||
|
||||
@@ -26,8 +26,7 @@ PG_DB_NAME="thingsboard_db" PG_DB_USER="thingsboard" setup_postgresql_db
|
||||
fetch_and_deploy_gh_release "thingsboard" "thingsboard/thingsboard" "binary" "latest" "/tmp" "thingsboard-*.deb"
|
||||
|
||||
msg_info "Configuring ThingsBoard"
|
||||
cat <<EOF >>/etc/thingsboard/conf/thingsboard.conf
|
||||
|
||||
cat <<EOF >/etc/thingsboard/conf/thingsboard.conf
|
||||
# DB Configuration
|
||||
export DATABASE_TS_TYPE=sql
|
||||
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/${PG_DB_NAME}
|
||||
|
||||
@@ -31,7 +31,7 @@ ln -sf /opt/bun/bin/bunx /usr/local/bin/bunx
|
||||
msg_ok "Installed Bun"
|
||||
|
||||
msg_info "Installing Deno"
|
||||
curl -fsSL https://deno.land/install.sh | CI=1 $STD sh -s
|
||||
$STD sh -c "curl -fsSL https://deno.land/install.sh | DENO_INSTALL=/usr/local sh -s -- -y"
|
||||
msg_ok "Installed Deno"
|
||||
|
||||
msg_info "Creating directories"
|
||||
|
||||
+15
-7
@@ -47,7 +47,7 @@ function check_disk_space() {
|
||||
}
|
||||
|
||||
TEMP_DIR=$(mktemp -d)
|
||||
if ! check_disk_space "$TEMP_DIR" 4 && [ -d "/var/tmp" ] && check_disk_space "/var/tmp" 4; then
|
||||
if ! check_disk_space "$TEMP_DIR" 20 && [ -d "/var/tmp" ] && check_disk_space "/var/tmp" 20; then
|
||||
rm -rf "$TEMP_DIR"
|
||||
TEMP_DIR=$(mktemp -d /var/tmp/opnsense-vm.XXXXXX)
|
||||
fi
|
||||
@@ -364,6 +364,15 @@ FREEBSD_VER="$VM_INDEX_LATEST"
|
||||
URL="$VM_INDEX_URL"
|
||||
msg_ok "Download URL: ${CL}${BL}${URL}${CL}"
|
||||
|
||||
# Check available disk space (require at least 20GB for safety)
|
||||
if ! check_disk_space "$TEMP_DIR" 20; then
|
||||
AVAILABLE_GB=$(df -h "$TEMP_DIR" | awk 'NR==2 {print $4}')
|
||||
msg_error "Insufficient disk space in temporary directory ($TEMP_DIR)."
|
||||
msg_error "Available: ${AVAILABLE_GB}, Required: ~20GB for FreeBSD image decompression."
|
||||
msg_error "Please free up space or ensure /tmp has sufficient storage."
|
||||
exit 214
|
||||
fi
|
||||
|
||||
msg_info "Downloading FreeBSD Image"
|
||||
# A mirror serving an error page returns 200, so size decides whether this
|
||||
# is an image. Anything real here is far above 5 MB.
|
||||
@@ -372,12 +381,11 @@ vm_fetch_image "$URL" "$CACHE_FILE" --cache --verify-xz --min-bytes $((5 * 1024
|
||||
echo -en "\e[1A\e[0K"
|
||||
msg_ok "Downloaded ${CL}${BL}$(basename "$CACHE_FILE")${CL}"
|
||||
|
||||
NEED_GB=$(($(xz --robot -l "$CACHE_FILE" | awk '$1 == "totals" {print $5}') / 1024 / 1024 / 1024 + 1))
|
||||
if ! check_disk_space "$TEMP_DIR" "$NEED_GB"; then
|
||||
# Check disk space again before decompression
|
||||
if ! check_disk_space "$TEMP_DIR" 15; then
|
||||
AVAILABLE_GB=$(df -h "$TEMP_DIR" | awk 'NR==2 {print $4}')
|
||||
msg_error "Insufficient disk space for decompression in ${TEMP_DIR}."
|
||||
msg_error "Available: ${AVAILABLE_GB}, Required: ~${NEED_GB}GB for the decompressed image."
|
||||
msg_error "Please free up space or ensure /tmp or /var/tmp has sufficient storage."
|
||||
msg_error "Insufficient disk space for decompression."
|
||||
msg_error "Available: ${AVAILABLE_GB}, Required: ~15GB for decompressed image."
|
||||
exit 214
|
||||
fi
|
||||
|
||||
@@ -409,7 +417,7 @@ while :; do
|
||||
alloc_delay=$((alloc_delay * 2))
|
||||
continue
|
||||
fi
|
||||
msg_error "Could not allocate the EFI disk on ${STORAGE}: ${alloc_err}"
|
||||
echo -e "$alloc_err" >&2
|
||||
exit 220
|
||||
done
|
||||
vm_import_disk "$VMID" "$FILE" "$STORAGE"
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main}"
|
||||
COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}"
|
||||
source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/pve/vm-core.func")
|
||||
load_functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user