godoxy
This commit is contained in:
63
ct/godoxy.sh
Normal file
63
ct/godoxy.sh
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
#!/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/yusing/godoxy
|
||||||
|
|
||||||
|
APP="GoDoxy"
|
||||||
|
var_tags="${var_tags:-reverse-proxy;go;webui}"
|
||||||
|
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/local/bin/godoxy ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if check_for_gh_release "godoxy" "yusing/godoxy"; then
|
||||||
|
msg_info "Stopping Service"
|
||||||
|
systemctl stop godoxy
|
||||||
|
msg_ok "Stopped Service"
|
||||||
|
|
||||||
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "tarball" "latest" "/opt/godoxy-src"
|
||||||
|
|
||||||
|
msg_info "Building GoDoxy (Patience)"
|
||||||
|
export PATH="/usr/local/go/bin:/root/.bun/bin:$PATH"
|
||||||
|
cd /opt/godoxy-src
|
||||||
|
sed -i '/^module github\.com\/yusing\/godoxy/!{/github\.com\/yusing\/godoxy/d}' go.mod
|
||||||
|
sed -i '/^module github\.com\/yusing\/goutils/!{/github\.com\/yusing\/goutils/d}' go.mod
|
||||||
|
$STD make build
|
||||||
|
cp /opt/godoxy-src/bin/godoxy /usr/local/bin/godoxy
|
||||||
|
msg_ok "Built GoDoxy"
|
||||||
|
|
||||||
|
msg_info "Starting Service"
|
||||||
|
systemctl start godoxy
|
||||||
|
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 the WebUI using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8888${CL}"
|
||||||
102
install/godoxy-install.sh
Normal file
102
install/godoxy-install.sh
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
#!/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/yusing/godoxy
|
||||||
|
|
||||||
|
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 \
|
||||||
|
make \
|
||||||
|
libcap2-bin
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
GO_VERSION="1.24" setup_go
|
||||||
|
|
||||||
|
msg_info "Installing Bun"
|
||||||
|
export BUN_INSTALL="/root/.bun"
|
||||||
|
curl -fsSL https://bun.sh/install | $STD bash
|
||||||
|
ln -sf /root/.bun/bin/bun /usr/local/bin/bun
|
||||||
|
msg_ok "Installed Bun"
|
||||||
|
|
||||||
|
fetch_and_deploy_gh_release "godoxy" "yusing/godoxy" "tarball" "latest" "/opt/godoxy-src"
|
||||||
|
|
||||||
|
msg_info "Building GoDoxy (Patience)"
|
||||||
|
export PATH="/usr/local/go/bin:/root/.bun/bin:$PATH"
|
||||||
|
cd /opt/godoxy-src
|
||||||
|
sed -i '/^module github\.com\/yusing\/godoxy/!{/github\.com\/yusing\/godoxy/d}' go.mod
|
||||||
|
sed -i '/^module github\.com\/yusing\/goutils/!{/github\.com\/yusing\/goutils/d}' go.mod
|
||||||
|
$STD make build
|
||||||
|
cp /opt/godoxy-src/bin/godoxy /usr/local/bin/godoxy
|
||||||
|
msg_ok "Built GoDoxy"
|
||||||
|
|
||||||
|
msg_info "Configuring GoDoxy"
|
||||||
|
mkdir -p /opt/godoxy/{config,data/metrics,certs}
|
||||||
|
JWT_SECRET=$(openssl rand -base64 32)
|
||||||
|
GODOXY_PASS=$(openssl rand -base64 12 | tr -dc 'a-zA-Z0-9' | cut -c1-16)
|
||||||
|
cat <<EOF >/opt/godoxy/.env
|
||||||
|
TZ=UTC
|
||||||
|
GODOXY_HTTP_ADDR=:80
|
||||||
|
GODOXY_HTTPS_ADDR=:443
|
||||||
|
GODOXY_API_ADDR=0.0.0.0:8888
|
||||||
|
GODOXY_API_JWT_SECURE=false
|
||||||
|
GODOXY_API_JWT_SECRET=${JWT_SECRET}
|
||||||
|
GODOXY_API_USER=admin
|
||||||
|
GODOXY_API_PASSWORD=${GODOXY_PASS}
|
||||||
|
EOF
|
||||||
|
cat <<EOF >/opt/godoxy/config/config.yml
|
||||||
|
entrypoint:
|
||||||
|
support_proxy_protocol: false
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
healthcheck:
|
||||||
|
interval: 5s
|
||||||
|
timeout: 15s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
|
providers:
|
||||||
|
include: []
|
||||||
|
|
||||||
|
homepage:
|
||||||
|
use_default_categories: true
|
||||||
|
|
||||||
|
timeout_shutdown: 5
|
||||||
|
EOF
|
||||||
|
msg_ok "Configured GoDoxy"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/godoxy.service
|
||||||
|
[Unit]
|
||||||
|
Description=GoDoxy Reverse Proxy
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
WorkingDirectory=/opt/godoxy
|
||||||
|
EnvironmentFile=/opt/godoxy/.env
|
||||||
|
ExecStart=/usr/local/bin/godoxy
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now godoxy
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
cleanup_lxc
|
||||||
|
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}WebUI:${CL} http://${LOCAL_IP}:8888"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}Username:${CL} admin"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}Password:${CL} ${GODOXY_PASS}"
|
||||||
52
json/godoxy.json
Normal file
52
json/godoxy.json
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"name": "GoDoxy",
|
||||||
|
"slug": "godoxy",
|
||||||
|
"categories": [
|
||||||
|
21
|
||||||
|
],
|
||||||
|
"date_created": "2026-03-24",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 8888,
|
||||||
|
"documentation": "https://docs.godoxy.dev",
|
||||||
|
"website": "https://github.com/yusing/godoxy",
|
||||||
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/godoxy.webp",
|
||||||
|
"config_path": "/opt/godoxy/config/config.yml",
|
||||||
|
"description": "GoDoxy is a lightweight, performant reverse proxy written in Go with a WebUI, automatic SSL certificate management, Docker auto-discovery, OpenID Connect support, and Proxmox integration.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/godoxy.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 2048,
|
||||||
|
"hdd": 8,
|
||||||
|
"os": "Debian",
|
||||||
|
"version": "13"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": "admin",
|
||||||
|
"password": "Generated during install"
|
||||||
|
},
|
||||||
|
"notes": [
|
||||||
|
{
|
||||||
|
"text": "The initial build from source takes several minutes.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "Docker auto-discovery is not available in this bare-metal install. Configure routes manually via YAML files in /opt/godoxy/config/.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "The admin password is shown at the end of the installation log.",
|
||||||
|
"type": "info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "For HTTPS support, configure autocert in /opt/godoxy/config/config.yml and set GODOXY_API_JWT_SECURE=true in /opt/godoxy/.env.",
|
||||||
|
"type": "info"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user