From 494d41392d3bce8b2cfa9d5fce29a6078b2132da Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sat, 2 May 2026 21:13:05 +0200 Subject: [PATCH] add docuseal Co-authored-by: Copilot --- ct/docuseal.sh | 81 ++++++++++++++++++++ install/docuseal-install.sh | 149 ++++++++++++++++++++++++++++++++++++ json/docuseal.json | 45 +++++++++++ 3 files changed, 275 insertions(+) create mode 100644 ct/docuseal.sh create mode 100644 install/docuseal-install.sh create mode 100644 json/docuseal.json diff --git a/ct/docuseal.sh b/ct/docuseal.sh new file mode 100644 index 00000000..83cb8b98 --- /dev/null +++ b/ct/docuseal.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://www.docuseal.com/ + +APP="DocuSeal" +var_tags="${var_tags:-document;esignature;pdf}" +var_cpu="${var_cpu:-4}" +var_ram="${var_ram:-4096}" +var_disk="${var_disk:-10}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +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/docuseal ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "docuseal" "docusealco/docuseal"; then + msg_info "Stopping Services" + systemctl stop docuseal docuseal-sidekiq + msg_ok "Stopped Services" + + msg_info "Backing up Configuration" + cp /opt/docuseal/.env /opt/docuseal.env.bak + msg_ok "Backed up Configuration" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball" + + msg_info "Restoring Configuration" + mv /opt/docuseal.env.bak /opt/docuseal/.env + msg_ok "Restored Configuration" + + msg_info "Building Application" + cd /opt/docuseal + export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" + eval "$(rbenv init - bash)" 2>/dev/null || true + export RAILS_ENV=production + export NODE_ENV=production + export BUNDLE_WITHOUT="development:test" + export SECRET_KEY_BASE_DUMMY=1 + set -a + source /opt/docuseal/.env + set +a + $STD bundle config set --local without 'development test' + $STD bundle install -j"$(nproc)" + $STD yarn install --network-timeout 1000000 + $STD ./bin/shakapacker + $STD bundle exec rails db:migrate + $STD bundle exec bootsnap precompile -j 1 --gemfile app/ lib/ + msg_ok "Built Application" + + msg_info "Starting Services" + systemctl start docuseal docuseal-sidekiq + 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}:3000${CL}" diff --git a/install/docuseal-install.sh b/install/docuseal-install.sh new file mode 100644 index 00000000..81184972 --- /dev/null +++ b/install/docuseal-install.sh @@ -0,0 +1,149 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://www.docuseal.com/ + +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 \ + git \ + libpq-dev \ + libssl-dev \ + libyaml-dev \ + libreadline-dev \ + zlib1g-dev \ + libffi-dev \ + libvips42 \ + libvips-dev \ + libheif1 \ + redis-server \ + fontconfig +msg_ok "Installed Dependencies" + +NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs +RUBY_VERSION="4.0.1" RUBY_INSTALL_RAILS="false" setup_ruby +PG_VERSION="17" setup_postgresql +PG_DB_NAME="docuseal" PG_DB_USER="docuseal" setup_postgresql_db + +msg_info "Downloading Fonts and PDFium" +mkdir -p /opt/fonts /usr/share/fonts/noto +ARCH=$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/') +curl -fsSL -o /opt/fonts/GoNotoKurrent-Regular.ttf \ + https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Regular.ttf +curl -fsSL -o /opt/fonts/GoNotoKurrent-Bold.ttf \ + https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Bold.ttf +curl -fsSL -o /opt/fonts/DancingScript-Regular.otf \ + https://github.com/impallari/DancingScript/raw/master/fonts/DancingScript-Regular.otf +ln -sf /opt/fonts/GoNotoKurrent-Regular.ttf /usr/share/fonts/noto/ +ln -sf /opt/fonts/GoNotoKurrent-Bold.ttf /usr/share/fonts/noto/ +$STD fc-cache -f +curl -fsSL -o /tmp/pdfium.tgz \ + "https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-${ARCH}.tgz" +mkdir -p /tmp/pdfium && tar -xzf /tmp/pdfium.tgz -C /tmp/pdfium +cp /tmp/pdfium/lib/libpdfium.so /usr/lib/libpdfium.so +rm -rf /tmp/pdfium /tmp/pdfium.tgz +msg_ok "Downloaded Fonts and PDFium" + +fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball" + +msg_info "Downloading Field Detection Model" +mkdir -p /opt/docuseal/tmp +curl -fsSL -o /opt/docuseal/tmp/model.onnx \ + "https://github.com/docusealco/fields-detection/releases/download/2.0.0/model_704_int8.onnx" +mkdir -p /opt/docuseal/public/fonts +ln -sf /opt/fonts/DancingScript-Regular.otf /opt/docuseal/public/fonts/DancingScript-Regular.otf +msg_ok "Downloaded Field Detection Model" + +msg_info "Configuring DocuSeal" +SECRET_KEY=$(openssl rand -hex 64) +mkdir -p /opt/docuseal/data +cat </opt/docuseal/.env +RAILS_ENV=production +NODE_ENV=production +RAILS_LOG_TO_STDOUT=true +RAILS_SERVE_STATIC_FILES=true +SECRET_KEY_BASE=${SECRET_KEY} +DATABASE_URL=postgresql://docuseal:${PG_DB_PASS}@127.0.0.1:5432/docuseal +WORKDIR=/opt/docuseal/data +HOME=/opt/docuseal/data +VIPS_MAX_COORD=17000 +EOF +msg_ok "Configured DocuSeal" + +msg_info "Building Application" +cd /opt/docuseal +export PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" +eval "$(rbenv init - bash)" 2>/dev/null || true +export RAILS_ENV=production +export NODE_ENV=production +export BUNDLE_WITHOUT="development:test" +export SECRET_KEY_BASE_DUMMY=1 +set -a +source /opt/docuseal/.env +set +a +$STD bundle config set --local without 'development test' +$STD bundle install -j"$(nproc)" +$STD yarn install --network-timeout 1000000 +$STD ./bin/shakapacker +$STD bundle exec rails db:migrate +$STD bundle exec bootsnap precompile -j 1 --gemfile app/ lib/ +msg_ok "Built Application" + +msg_info "Enabling Redis" +systemctl enable -q --now redis-server +msg_ok "Enabled Redis" + +msg_info "Creating Services" +cat </etc/systemd/system/docuseal.service +[Unit] +Description=DocuSeal Web +After=network.target postgresql.service redis-server.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/docuseal +EnvironmentFile=/opt/docuseal/.env +Environment=PATH=/root/.rbenv/shims:/root/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ExecStart=/root/.rbenv/shims/bundle exec puma -C /opt/docuseal/config/puma.rb --dir /opt/docuseal -p 3000 +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF + +cat </etc/systemd/system/docuseal-sidekiq.service +[Unit] +Description=DocuSeal Sidekiq +After=network.target postgresql.service redis-server.service + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/docuseal +EnvironmentFile=/opt/docuseal/.env +Environment=PATH=/root/.rbenv/shims:/root/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ExecStart=/root/.rbenv/shims/bundle exec sidekiq +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now docuseal docuseal-sidekiq +msg_ok "Created Services" + +motd_ssh +customize +cleanup_lxc diff --git a/json/docuseal.json b/json/docuseal.json new file mode 100644 index 00000000..33c5cf41 --- /dev/null +++ b/json/docuseal.json @@ -0,0 +1,45 @@ +{ + "name": "DocuSeal", + "slug": "docuseal", + "categories": [ + 12 + ], + "date_created": "2026-05-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 3000, + "documentation": "https://www.docuseal.com/docs", + "website": "https://www.docuseal.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/docuseal.webp", + "config_path": "/opt/docuseal/.env", + "description": "DocuSeal is an open source platform that provides secure and efficient digital document signing and processing. Create PDF forms to have them filled and signed online on any device with an easy-to-use, mobile-optimized web tool.", + "install_methods": [ + { + "type": "default", + "script": "ct/docuseal.sh", + "config_path": "/opt/docuseal/.env", + "resources": { + "cpu": 4, + "ram": 4096, + "hdd": 10, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "On first access, create the initial admin account via the web UI.", + "type": "info" + }, + { + "text": "The first build (bundle install + shakapacker) takes a while - be patient.", + "type": "warning" + } + ] +} \ No newline at end of file