Compare commits

...

7 Commits

Author SHA1 Message Date
MickLesk ef8feb43b3 author 2026-08-01 21:32:26 +02:00
MickLesk ada63788bc New Script: Portainer 2026-08-01 21:30:21 +02:00
MickLesk 5b65310d62 Update build.func 2026-07-31 14:13:45 +02:00
community-scripts-pr-app[bot] 4a92a434e4 Update CHANGELOG.md (#16178)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-31 07:46:59 +00:00
CanbiZ (MickLesk) 81fd7ef01a Docmost: cleanup folder at update (#16177) 2026-07-31 09:46:30 +02:00
community-scripts-pr-app[bot] fdb029403d Update CHANGELOG.md (#16176)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-07-31 05:49:49 +00:00
Slaviša Arežina 304e73cd18 Firecrawl: Add dependency (#16174)
* Add deps

* formatting
2026-07-31 07:49:17 +02:00
6 changed files with 216 additions and 5 deletions
+9
View File
@@ -508,6 +508,15 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-07-31
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Docmost: cleanup folder at update [@MickLesk](https://github.com/MickLesk) ([#16177](https://github.com/community-scripts/ProxmoxVE/pull/16177))
- Firecrawl: Add dependency [@tremor021](https://github.com/tremor021) ([#16174](https://github.com/community-scripts/ProxmoxVE/pull/16174))
## 2026-07-30
### 🆕 New Scripts
+3 -3
View File
@@ -37,9 +37,9 @@ function update_script() {
systemctl stop docmost
msg_ok "Stopped Service"
create_backup /opt/docmost/.env \
/opt/docmost/data
fetch_and_deploy_gh_release "docmost" "docmost/docmost" "tarball"
create_backup /opt/docmost/.env /opt/docmost/data
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docmost" "docmost/docmost" "tarball"
restore_backup
+3 -1
View File
@@ -30,6 +30,8 @@ function update_script() {
exit
fi
ensure_dependencies build-essential
if check_for_gh_release "firecrawl" "firecrawl/firecrawl"; then
msg_info "Stopping Services"
systemctl stop firecrawl firecrawl-playwright
@@ -40,7 +42,7 @@ function update_script() {
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "firecrawl" "firecrawl/firecrawl" "tarball" "latest" "/opt/firecrawl"
restore_backup
FDB_VERSION="$(awk -F= '/^ARG FDB_VERSION=/{print $2; exit}' /opt/firecrawl/apps/api/Dockerfile)"
if [[ -z "$FDB_VERSION" ]]; then
msg_error "FDB_VERSION pin not found in upstream Dockerfile"
+1 -1
View File
@@ -15,6 +15,7 @@ update_os
msg_info "Installing Dependencies"
$STD apt install -y \
build-essential \
cmake \
git \
nftables \
@@ -43,7 +44,6 @@ FDB_ARCH="$(get_system_arch)"
fetch_and_deploy_gh_release "foundationdb-clients" "apple/foundationdb" "binary" "$FDB_VERSION" "/opt/foundationdb-clients" "foundationdb-clients_${FDB_VERSION}-1_${FDB_ARCH}.deb"
msg_ok "Configured FDB"
PG_DB_NAME="firecrawl" PG_DB_USER="firecrawl" PG_DB_EXTENSIONS="pgcrypto,pg_cron" PG_DB_CREDS_FILE="/dev/null" setup_postgresql_db
msg_info "Configuring pg_cron"
+10
View File
@@ -5200,6 +5200,16 @@ EOF
# TSTP = Ctrl+Z, TTIN = bg read from tty, TTOU = bg write to tty (tostop)
trap '' TSTP TTIN TTOU
# lxc-attach takes the controlling terminal while the install runs and does
# not hand it back, leaving us in a background process group. Reading from
# the terminal then returns EIO instead of blocking, because SIGTTIN is
# ignored above - so every recovery prompt fails before the user can answer.
# Redirecting to /dev/tty does not help: the rule applies to the terminal,
# not the file descriptor. Claim the foreground group back; SIGTTOU is
# ignored too, so tcsetpgrp() succeeds instead of stopping us. No-op when we
# already are in the foreground. perl is a hard dependency of Proxmox VE.
perl -e 'use POSIX; open(my $t, "+<", "/dev/tty") or exit 1; POSIX::tcsetpgrp(fileno($t), getpgrp()) or exit 1;' 2>/dev/null || true
msg_error "Installation failed in container ${CTID} (exit code: ${install_exit_code})"
# Copy install log from container BEFORE API call so get_error_text() can read it
+190
View File
@@ -0,0 +1,190 @@
#!/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/portainer/portainer
if ! command -v curl &>/dev/null; then
printf "\r\e[2K%b" '\033[93m Setup Source \033[m' >&2
apt-get update >/dev/null 2>&1
apt-get install -y curl >/dev/null 2>&1
fi
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "portainer" "addon"
# Enable error handling
set -Eeuo pipefail
trap 'error_handler' ERR
# ==============================================================================
# CONFIGURATION
# ==============================================================================
APP="Portainer"
APP_TYPE="addon"
INSTALL_PATH="/opt/portainer"
COMPOSE_FILE="${INSTALL_PATH}/compose.yaml"
DEFAULT_PORT=9443
# Initialize all core functions (colors, formatting, icons, STD mode)
load_functions
# ==============================================================================
# UNINSTALL
# ==============================================================================
function uninstall() {
msg_info "Uninstalling ${APP}"
if [[ -f "$COMPOSE_FILE" ]]; then
msg_info "Stopping and removing Docker containers"
cd "$INSTALL_PATH"
$STD docker compose down --volumes --remove-orphans
msg_ok "Stopped and removed Docker containers"
fi
rm -rf "$INSTALL_PATH"
rm -f "/usr/local/bin/update_portainer"
msg_ok "${APP} has been uninstalled"
}
# ==============================================================================
# UPDATE
# ==============================================================================
function update() {
msg_info "Pulling latest ${APP} image"
cd "$INSTALL_PATH"
$STD docker compose pull
msg_ok "Pulled latest image"
msg_info "Restarting ${APP}"
$STD docker compose up -d --remove-orphans
msg_ok "Restarted ${APP}"
msg_ok "Updated successfully"
exit
}
# ==============================================================================
# CHECK DOCKER
# ==============================================================================
function check_docker() {
if ! command -v docker &>/dev/null; then
msg_error "Docker is not installed. This script requires an existing Docker LXC. Exiting."
exit 10
fi
if ! docker compose version &>/dev/null; then
msg_error "Docker Compose plugin is not available. Please install it before running this script. Exiting."
exit 10
fi
msg_ok "Docker $(docker --version | cut -d' ' -f3 | tr -d ',') and Docker Compose are available"
}
# ==============================================================================
# CHECK EXISTING CONTAINER
# ==============================================================================
function check_existing_container() {
# Guards against clobbering a Portainer container not managed by this addon
# (e.g. Business/Enterprise Edition installed manually or via the legacy docker.sh flow)
if docker ps -a --format '{{.Names}}' | grep -q '^portainer$'; then
msg_error "A container named 'portainer' already exists but is not managed by this addon."
msg_error "This may be a Portainer Business/Enterprise Edition install or a manual setup."
msg_error "Remove/rename that container first, or manage it manually. Exiting."
exit 10
fi
}
# ==============================================================================
# INSTALL
# ==============================================================================
function install() {
check_docker
check_existing_container
msg_info "Creating install directory"
mkdir -p "$INSTALL_PATH"
msg_ok "Created ${INSTALL_PATH}"
msg_info "Downloading Docker Compose file"
curl -fsSL "https://downloads.portainer.io/ce-sts/portainer-compose.yaml" -o "$COMPOSE_FILE"
msg_ok "Downloaded Docker Compose file"
msg_info "Starting ${APP}"
cd "$INSTALL_PATH"
$STD docker compose up -d
msg_ok "Started ${APP}"
# Create update script
msg_info "Creating update script"
cat <<'UPDATEEOF' >/usr/local/bin/update_portainer
#!/usr/bin/env bash
# Portainer Update Script
type=update bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/portainer.sh)"
UPDATEEOF
chmod +x /usr/local/bin/update_portainer
msg_ok "Created update script (/usr/local/bin/update_portainer)"
echo ""
msg_ok "${APP} is reachable at: ${BL}https://${LOCAL_IP}:${DEFAULT_PORT}${CL}"
echo ""
msg_warn "On first access, you'll be prompted to create an admin account."
}
# ==============================================================================
# MAIN
# ==============================================================================
# Handle type=update (called from update script)
if [[ "${type:-}" == "update" ]]; then
header_info
if [[ -f "$COMPOSE_FILE" ]]; then
update
else
msg_error "${APP} is not installed. Nothing to update."
exit 233
fi
exit 0
fi
header_info
get_lxc_ip
# Check if already installed
if [[ -f "$COMPOSE_FILE" ]]; then
msg_warn "${APP} is already installed."
echo ""
echo -n "${TAB}Uninstall ${APP}? (y/N): "
read -r uninstall_prompt
if [[ "${uninstall_prompt,,}" =~ ^(y|yes)$ ]]; then
uninstall
exit 0
fi
echo -n "${TAB}Update ${APP}? (y/N): "
read -r update_prompt
if [[ "${update_prompt,,}" =~ ^(y|yes)$ ]]; then
update
exit 0
fi
msg_warn "No action selected. Exiting."
exit 0
fi
# Fresh installation
msg_warn "${APP} is not installed."
echo ""
echo -e "${TAB}${INFO} This will install:"
echo -e "${TAB} - Portainer (via Docker Compose)"
echo ""
echo -n "${TAB}Install ${APP}? (y/N): "
read -r install_prompt
if [[ "${install_prompt,,}" =~ ^(y|yes)$ ]]; then
install
else
msg_warn "Installation cancelled. Exiting."
exit 0
fi