mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2026-11-13 09:20:39 +00:00
Add bulwark (ct) (#18656)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
b107350c78
commit
fc4f8e2ac5
2 files changed
+120
No files matched your search
@@ -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,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
|
||||
Reference in new issue
Block a user