File tree Expand file tree Collapse file tree 3 files changed +108
-0
lines changed
Expand file tree Collapse file tree 3 files changed +108
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ source <( curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+ # Copyright (c) 2021-2025 community-scripts ORG
4+ # Author: MickLesk (CanbiZ)
5+ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+ # Source: https://alpinelinux.org/
7+
8+ APP=" Alpine-Traefik"
9+ var_tags=" ${var_tags:- os;alpine} "
10+ var_cpu=" ${var_cpu:- 1} "
11+ var_ram=" ${var_ram:- 512} "
12+ var_disk=" ${var_disk:- 1} "
13+ var_os=" ${var_os:- alpine} "
14+ var_version=" ${var_version:- 3.21} "
15+ var_unprivileged=" ${var_unprivileged:- 1} "
16+
17+ header_info " $APP "
18+ variables
19+ color
20+ catch_errors
21+
22+ function update_script() {
23+ header_info
24+ msg_info " Updating Alpine Packages"
25+ $STD apk -U upgrade
26+ msg_ok " Updated Alpine Packages"
27+
28+ msg_info " Upgrading traefik from edge"
29+ $STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
30+ msg_ok " Upgraded traefik"
31+ exit
32+ }
33+
34+ start
35+ build_container
36+ description
37+
38+ msg_ok " Completed Successfully!\n"
39+ echo -e " ${CREATING}${GN}${APP} setup has been successfully initialized!${CL} "
40+ echo -e " ${INFO}${YW} WebUI Access (if configured) - using the following URL:${CL} "
41+ echo -e " ${TAB}${GATEWAY}${BGN} http://${IP} :8080/dashboard${CL} "
Original file line number Diff line number Diff line change 2525 "os" : " debian" ,
2626 "version" : " 12"
2727 }
28+ },
29+ {
30+ "type" : " alpine" ,
31+ "script" : " ct/alpine-traefik.sh" ,
32+ "resources" : {
33+ "cpu" : 1 ,
34+ "ram" : 512 ,
35+ "hdd" : 1 ,
36+ "os" : " alpine" ,
37+ "version" : " 3.21"
38+ }
2839 }
2940 ],
3041 "default_credentials" : {
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright (c) 2021-2025 community-scripts ORG
4+ # Author: MickLesk (CanbiZ)
5+ # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+ source /dev/stdin <<< " $FUNCTIONS_FILE_PATH"
8+ color
9+ verb_ip6
10+ catch_errors
11+ setting_up_container
12+ network_check
13+ update_os
14+
15+ msg_info " Installing Dependencies"
16+ $STD apk add ca-certificates
17+ $STD update-ca-certificates
18+ msg_ok " Installed Dependencies"
19+
20+ msg_info " Installing Traefik"
21+ $STD apk add traefik --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community
22+ msg_ok " Installed Traefik"
23+
24+ read -p " Enable Traefik WebUI (Port 8080)? [y/N]: " enable_webui
25+ if [[ " $enable_webui " =~ ^[Yy]$ ]]; then
26+ msg_info " Configuring Traefik WebUI"
27+ mkdir -p /etc/traefik/config
28+ cat << EOF >/etc/traefik/traefik.yml
29+ entryPoints:
30+ web:
31+ address: ":80"
32+ traefik:
33+ address: ":8080"
34+
35+ api:
36+ dashboard: true
37+ insecure: true
38+
39+ log:
40+ level: INFO
41+
42+ providers:
43+ file:
44+ directory: /etc/traefik/config
45+ watch: true
46+ EOF
47+ msg_ok " Configured Traefik WebUI"
48+ fi
49+
50+ msg_info " Enabling and starting Traefik service"
51+ $STD rc-update add traefik default
52+ $STD rc-service traefik start
53+ msg_ok " Traefik service started"
54+
55+ motd_ssh
56+ customize
You can’t perform that action at this time.
0 commit comments