KazV2/dockers/traefik/proxy-gen.sh

21 lines
625 B
Bash
Raw Normal View History

2024-06-03 18:43:35 +02:00
#!/bin/bash
KAZ_ROOT=$(cd "$(dirname $0)/../.."; pwd)
. "${KAZ_ROOT}/bin/.commonFunctions.sh"
setKazVars
. "${DOCKERS_ENV}"
. "${KAZ_ROOT}/secret/SetAllPass.sh"
printKazMsg "\n *** Proxy update config"
DOCKER_TMPL=docker-compose.tmpl.yml
2024-08-16 16:15:24 +02:00
DOCKER_DIST=docker-compose.tmpl.yml.dist
2024-06-03 18:43:35 +02:00
DOCKER_CONF=docker-compose.yml
PASSFILE=conf/passfile
cd $(dirname $0)
[[ -f "${DOCKER_TMPL}" ]] || cp "${DOCKER_DIST}" "${DOCKER_TMPL}"
2024-08-16 16:15:24 +02:00
[[ -f "${PASSFILE}" ]] || printf "${traefik_DASHBOARD_USER}:$( echo ${traefik_DASHBOARD_PASSWORD} | openssl passwd -apr1 -stdin)\n" >> ${PASSFILE}
2024-06-03 18:43:35 +02:00
"${APPLY_TMPL}" -time "${DOCKER_TMPL}" "${DOCKER_CONF}"