mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-18 06:35:03 +00:00
ebf755031b
When running in certain LXC environments (e.g. systems with desktop packages or non-en locales), the HOME variable may resolve to '/' instead of '/root'. rbenv installs to $HOME/.rbenv, so if HOME is wrong it ends up in /.rbenv while all service files and PATH exports hardcode /root/.rbenv, causing 'env: ruby: No such file or directory'. Explicitly set HOME=/root for all setup_ruby calls that run as root, and replace all $HOME/.rbenv references in PATH exports and install steps with /root/.rbenv literals. Affected scripts: - ct/sure.sh + install/sure-install.sh (fixes #14479) - ct/dawarich.sh + install/dawarich-install.sh - ct/docuseal.sh + install/docuseal-install.sh Also add TimeoutStartSec=300 to sure.service so db:prepare on first start does not get killed by the default 90s systemd timeout.
85 lines
2.5 KiB
Bash
85 lines
2.5 KiB
Bash
#!/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://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 Data"
|
|
cp /opt/docuseal/.env /opt/docuseal.env.bak
|
|
[[ -d /opt/docuseal/data ]] && mv /opt/docuseal/data /opt/docuseal_data.bak
|
|
msg_ok "Backed up Data"
|
|
|
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball"
|
|
|
|
msg_info "Restoring Data"
|
|
mv /opt/docuseal.env.bak /opt/docuseal/.env
|
|
[[ -d /opt/docuseal_data.bak ]] && mv /opt/docuseal_data.bak /opt/docuseal/data
|
|
msg_ok "Restored Data"
|
|
|
|
msg_info "Building Application"
|
|
cd /opt/docuseal
|
|
export PATH="/root/.rbenv/bin:/root/.rbenv/shims:${PATH}"
|
|
eval "$(rbenv init - bash)" 2>/dev/null || true
|
|
export RAILS_ENV=production
|
|
export NODE_ENV=production
|
|
export SECRET_KEY_BASE_DUMMY=1
|
|
set -a
|
|
source /opt/docuseal/.env
|
|
set +a
|
|
$STD bundle config set --local deployment 'true'
|
|
$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/
|
|
chown -R docuseal:docuseal /opt/docuseal
|
|
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}"
|