From 8c3f67536bdc300768079a2b77dde6ecc55163a7 Mon Sep 17 00:00:00 2001 From: MickLesk Date: Tue, 10 Mar 2026 18:35:57 +0100 Subject: [PATCH] add versitygw --- ct/versitygw.sh | 54 +++++++++++++++++++++++++++++ frontend/public/json/versitygw.json | 48 +++++++++++++++++++++++++ install/versitygw-install.sh | 37 ++++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 ct/versitygw.sh create mode 100644 frontend/public/json/versitygw.json create mode 100644 install/versitygw-install.sh diff --git a/ct/versitygw.sh b/ct/versitygw.sh new file mode 100644 index 000000000..6d46337cc --- /dev/null +++ b/ct/versitygw.sh @@ -0,0 +1,54 @@ +#!/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://github.com/versity/versitygw + +APP="VersityGW" +var_tags="${var_tags:-s3;storage;gateway}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +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 [[ ! -f /usr/bin/versitygw ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "versitygw" "versity/versitygw"; then + msg_info "Stopping Service" + systemctl stop versitygw@gateway + msg_ok "Stopped Service" + + fetch_and_deploy_gh_release "versitygw" "versity/versitygw" "binary" + + msg_info "Starting Service" + systemctl start versitygw@gateway + msg_ok "Started Service" + 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}:7070${CL}" diff --git a/frontend/public/json/versitygw.json b/frontend/public/json/versitygw.json new file mode 100644 index 000000000..e548ffd5d --- /dev/null +++ b/frontend/public/json/versitygw.json @@ -0,0 +1,48 @@ +{ + "name": "VersityGW", + "slug": "versitygw", + "categories": [ + 11 + ], + "date_created": "2026-03-10", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 7070, + "documentation": "https://github.com/versity/versitygw/wiki", + "config_path": "/etc/versitygw.d/gateway.conf", + "website": "https://www.versity.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/versitygw.webp", + "description": "VersityGW is a high-performance, cloud-native S3-compatible gateway that provides S3 API access to various storage backends including POSIX filesystems.", + "install_methods": [ + { + "type": "default", + "script": "ct/versitygw.sh", + "resources": { + "cpu": 2, + "ram": 2048, + "hdd": 8, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "S3 access credentials are generated during installation and stored in /etc/versitygw.d/gateway.conf", + "type": "info" + }, + { + "text": "Data is stored in /opt/versitygw-data (POSIX backend)", + "type": "info" + }, + { + "text": "Use any S3-compatible client to connect to the gateway endpoint", + "type": "info" + } + ] +} diff --git a/install/versitygw-install.sh b/install/versitygw-install.sh new file mode 100644 index 000000000..f25467cd3 --- /dev/null +++ b/install/versitygw-install.sh @@ -0,0 +1,37 @@ +#!/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://github.com/versity/versitygw + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +fetch_and_deploy_gh_release "versitygw" "versity/versitygw" "binary" + +msg_info "Configuring VersityGW" +mkdir -p /opt/versitygw-data +ACCESS_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-20) +SECRET_KEY=$(openssl rand -base64 36 | tr -dc 'a-zA-Z0-9' | cut -c1-40) +cat </etc/versitygw.d/gateway.conf +VGW_BACKEND=posix +VGW_BACKEND_ARG=/opt/versitygw-data +VGW_PORT=7070 +ROOT_ACCESS_KEY_ID=${ACCESS_KEY} +ROOT_SECRET_ACCESS_KEY=${SECRET_KEY} +EOF +msg_ok "Configured VersityGW" + +msg_info "Enabling Service" +systemctl enable -q --now versitygw@gateway +msg_ok "Enabled Service" + +motd_ssh +customize +cleanup_lxc