From 5d88b7c5f3817c732be6b6a0f0447bc4a5fbe931 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 6 May 2025 15:05:52 +0200 Subject: [PATCH] traefik alpine --- ct/alpine-traefik.sh | 41 +++++++++++++++++++++++++++++++++++++++ install/alpine-traefik.sh | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 ct/alpine-traefik.sh create mode 100644 install/alpine-traefik.sh diff --git a/ct/alpine-traefik.sh b/ct/alpine-traefik.sh new file mode 100644 index 0000000..da4af8d --- /dev/null +++ b/ct/alpine-traefik.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://alpinelinux.org/ + +APP="Alpine Traefik" +var_tags="${var_tags:-os;alpine}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-0.5}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.21}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 1 \ + "1" "Check for Alpine Updates" ON \ + 3>&1 1>&2 2>&3) + + header_info + if [ "$UPD" == "1" ]; then + apk update && apk upgrade + exit + fi +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" diff --git a/install/alpine-traefik.sh b/install/alpine-traefik.sh new file mode 100644 index 0000000..c659939 --- /dev/null +++ b/install/alpine-traefik.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing Dependencies" +$STD apk add newt +$STD apk add curl +$STD apk add openssh +$STD apk add nano +$STD apk add mc +msg_ok "Installed Dependencies" + +msg_info "Enabling edge repository for traefik" +echo "@edge https://dl-cdn.alpinelinux.org/alpine/edge/community" >>/etc/apk/repositories +$STD apk update +msg_ok "Enabled edge repository" + +msg_info "Installing Traefik" +$STD apk add traefik@edge +msg_ok "Installed Traefik" + +sed -i '/@edge/d' /etc/apk/repositories +$STD apk update + +motd_ssh +customize