Compare commits

...

3 Commits

Author SHA1 Message Date
Lockszmith (@Kateryna) 4f8e3da48c =dynamic traefik configuration updated 2025-03-24 23:58:34 -04:00
Lockszmith (@Kateryna) 26471c1cfe Add UMASK (with default) to compose template 2025-03-19 22:53:00 -04:00
Lockszmith (@Kateryna) 5bb44a6926 Added tab-completion to checkver 2025-03-19 22:52:17 -04:00
5 changed files with 125 additions and 2 deletions

View File

@ -2,6 +2,8 @@
SCRIPT_DIR=${SCRIPT_DIR:-"$( cd -- "$( dirname -- "$0" )" &> /dev/null && pwd )"}
set -e
BASE_NAME="${0##*/}"
SCRIPT_NAME="${SCRIPT_DIR}/${BASE_NAME}"
# Function to compare semantic versions
compare_major_version() {
@ -20,7 +22,7 @@ if [[ "${1}" =~ ^(-h|--help$) ]]; then
"Query runtipi's current version and compares with what is available online" \
"" \
"Usage:" \
" ${0##*/} -h | --help | [next] [<version>] " \
" ${BASE_NAME} -h | --help | [next] [<version>] " \
"" \
"Arguments:" \
" -h | --help Display usage" \
@ -36,7 +38,51 @@ if [[ "${1}" =~ ^(-h|--help$) ]]; then
" major versions do not match"
exit 1
fi
# --- tab completion ---
completion_bash() {
cat <<EOF
_runtipi_checkver()
{
local cur prev opts
COMPREPLY=()
cur="\${COMP_WORDS[COMP_CWORD]}"
prev="\${COMP_WORDS[COMP_CWORD-1]}"
opts="next --help -h"
case "\${prev}" in
next)
COMPREPLY=( \$(compgen -W "\$("${SCRIPT_NAME}" --next)" -- \${cur}) )
return 0
;;
*)
COMPREPLY=( \$(compgen -W "\${opts}" -- \${cur}) )
return 0
;;
esac
}
complete -F _runtipi_checkver ${BASE_NAME}
EOF
}
completion_zsh() {
cat <<EOF
_runtipi_checkver() {
_values "version" next --help -h
}
compdef _runtipi_checkver ${BASE_NAME}
EOF
}
if [ "$1" == "completion" ]; then
if [ "$2" == "bash" ]; then
completion_bash
elif [ "$2" == "zsh" ]; then
completion_zsh
fi
exit 0
fi
# Get Current Version of Runtipi
runtipi_path=${RUNTIPI_DIR:-"$(cd -- "${SCRIPT_DIR}/../.." &> /dev/null && pwd )"}
current_version="$1"
@ -97,3 +143,4 @@ elif [ "$next_tag" != "$current_version" ]; then
compare_major_version "$next_tag" "$current_version"
fi
# vim: set ft=sh expandtab tabstop=4 shiftwidth=4:

View File

@ -4,6 +4,7 @@ services:
environment:
PUID: "${HOST_UID}"
PGID: "${HOST_GID}"
UMASK: "${HOST_UMASK:-022}"
# RUNTIPI Environment
RUNTIPI_APP_PORT: "${APP_PORT}"
RUNTIPI_APP_ID: "${APP_ID}"

View File

@ -0,0 +1,19 @@
# http routing section
http:
routers:
<app>-on-kateryna:
service: kateryna-<app>
rule: Host(`<app>.szk.li`) && PathPrefix(`/`)
entrypoints:
- websecure
tls:
certresolver: myresolver
middlewares:
- authentik_sysmgr
services:
# Define how to reach an existing service on our infrastructure
kateryna-<app>:
loadBalancer:
servers:
- url: http://192.168.222.43:80

View File

@ -0,0 +1,19 @@
# http routing section
http:
routers:
jd-on-kateryna:
service: kateryna-jd
rule: Host(`jd.szk.li`) && PathPrefix(`/`)
entrypoints:
- websecure
tls:
certresolver: myresolver
middlewares:
- authentik_sysmgr
services:
# Define how to reach an existing service on our infrastructure
kateryna-jd:
loadBalancer:
servers:
- url: http://192.168.222.83:80

View File

@ -0,0 +1,37 @@
http:
routers:
# code-server:
# middlewares:
# - authentik_sysmgr@file
# sonarr:
# middlewares:
# - authentik_sysmgr@file
forgejo-more:
service: forgejo@docker
rule: Host(`code.lksz.me`)
entrypoints:
- websecure
tls:
certresolver: myresolver
traefik-dashboard:
service: dashboard@internal
rule: Host(`tfk.szk.li`) && PathPrefix(`/`)
entrypoints:
- websecure
tls:
certresolver: myresolver
middlewares:
- authentik_sysmgr@file
- dashboard_redirect@internal
traefik-api:
service: api@internal
rule: Host(`tfk.szk.li`) && PathPrefix(`/api`)
entrypoints:
- websecure
tls:
certresolver: myresolver
middlewares:
- authentik_sysmgr@file