mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-02-04 06:50:15 +00:00
Feature: Add xCaddy for external Modules on Caddy-LXC (#1613)
* add xcaddy to caddy for advanced modules * increase space of caddy * Update caddy.json * fix deps
This commit is contained in:
parent
fb67025f3b
commit
85109ecf11
@ -10,7 +10,7 @@ APP="Caddy"
|
||||
var_tags="webserver"
|
||||
var_cpu="1"
|
||||
var_ram="512"
|
||||
var_disk="2"
|
||||
var_disk="4"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
var_unprivileged="1"
|
||||
|
@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
@ -14,7 +13,14 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y {debian-keyring,debian-archive-keyring,apt-transport-https,gpg,curl,sudo,mc}
|
||||
$STD apt-get install -y \
|
||||
debian-keyring \
|
||||
debian-archive-keyring \
|
||||
apt-transport-https \
|
||||
gpg \
|
||||
curl \
|
||||
sudo \
|
||||
mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing Caddy"
|
||||
@ -24,6 +30,29 @@ $STD apt-get update
|
||||
$STD apt-get install -y caddy
|
||||
msg_ok "Installed Caddy"
|
||||
|
||||
read -r -p "Would you like to install xCaddy Addon? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
msg_info "Installing Golang"
|
||||
cd /opt
|
||||
set +o pipefail
|
||||
GOLANG=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-amd64.tar.gz" | head -n 1)
|
||||
wget -q https://golang.org/dl/$GOLANG
|
||||
tar -xzf $GOLANG -C /usr/local
|
||||
ln -s /usr/local/go/bin/go /usr/local/bin/go
|
||||
set -o pipefail
|
||||
rm -rf /opt/go*
|
||||
msg_ok "Installed Golang"
|
||||
|
||||
msg_info "Setup xCaddy"
|
||||
cd /opt
|
||||
RELEASE=$(curl -s https://api.github.com/repos/caddyserver/xcaddy/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||
wget -q https://github.com/caddyserver/xcaddy/releases/download/${RELEASE}/xcaddy_${RELEASE:1}_linux_amd64.deb
|
||||
$STD dpkg -i xcaddy_${RELEASE:1}_linux_amd64.deb
|
||||
rm -rf /opt/xcaddy*
|
||||
$STD xcaddy build
|
||||
msg_ok "Setup xCaddy"
|
||||
fi
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
"resources": {
|
||||
"cpu": 1,
|
||||
"ram": 512,
|
||||
"hdd": 2,
|
||||
"hdd": 4,
|
||||
"os": "debian",
|
||||
"version": "12"
|
||||
}
|
||||
@ -30,5 +30,14 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": []
|
||||
"notes": [
|
||||
{
|
||||
"text": "if you need an internal module run: `caddy add-package PACKAGENAME`",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "if you need an external module run: `xcaddy build --with github.com/caddy-dns/cloudflare`",
|
||||
"type": "info"
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user