Rename scheme to internalScheme
This commit is contained in:
parent
18caa638bd
commit
75edd0940d
|
@ -85,8 +85,8 @@ cat services.conf | while read line || [[ -n $line ]]; do
|
|||
;;
|
||||
esac
|
||||
# Define scheme // For nextcloud, scheme must be https
|
||||
scheme="http"
|
||||
[[ $key == "nextcloud" ]] && scheme="https"
|
||||
internalScheme="http"
|
||||
[[ $key == "nextcloud" ]] && internalScheme="https"
|
||||
|
||||
# Define service default port from bundled config file
|
||||
internalPort=$(cat config/ports | { grep $key || true; } | sed -r "s/^${key}: (.*)$/\1/")
|
||||
|
@ -95,7 +95,7 @@ cat services.conf | while read line || [[ -n $line ]]; do
|
|||
"host": "'"$key"'.'$(echo '${TRAEFIK_DOMAIN}')'",
|
||||
"httpAuth": '"${defaultHttpAuth}"',
|
||||
"internalPort": '"${internalPort}"',
|
||||
"scheme": "'"${scheme}"'"
|
||||
"internalScheme": "'"${internalScheme}"'"
|
||||
}
|
||||
]')
|
||||
;;
|
||||
|
|
|
@ -17,7 +17,7 @@ services:
|
|||
httpAuth: true
|
||||
internalPort: 8112
|
||||
# Uncomment to specify custom schme (http by default)
|
||||
# scheme: http
|
||||
# internalScheme: http
|
||||
# Uncomment to *NOT* generate LetsEncrypt certificate (useful for local domains)
|
||||
# disableCertificateGeneration: true
|
||||
- name: flood
|
||||
|
|
|
@ -208,9 +208,9 @@ for json in $(yq eval -o json config.yaml | jq -c ".services[]"); do
|
|||
[[ ${vpn} == "true" ]] && backendHost="gluetun"
|
||||
|
||||
# Handle custom scheme (default if non-specified is http)
|
||||
scheme="http"
|
||||
customScheme=$(echo $rule | jq -r .scheme)
|
||||
[[ ${customScheme} != "null" ]] && scheme=${customScheme}
|
||||
internalScheme="http"
|
||||
customInternalScheme=$(echo $rule | jq -r .internalScheme)
|
||||
[[ ${customInternalScheme} != "null" ]] && internalScheme=${customInternalScheme}
|
||||
|
||||
# Transform the bash syntax into Traefik/go one => anything.${TRAEFIK_DOMAIN} to anything.{{ env "TRAEFIK_DOMAIN" }}
|
||||
hostTraefik=$(echo ${host} | sed --regexp-extended 's/^(.*)(\$\{(.*)\})/\1\{\{ env "\3" \}\}/')
|
||||
|
@ -236,7 +236,7 @@ for json in $(yq eval -o json config.yaml | jq -c ".services[]"); do
|
|||
# If the specified service does not contain a "@" => we create it
|
||||
# If the service has a @, it means it is defined elsewhere so we do not create it (custom file, @internal...)
|
||||
if echo ${traefikService} | grep -vq "@"; then
|
||||
echo "http.services.${ruleId}.loadBalancer.servers.0.url: ${scheme}://${backendHost}:${internalPort}" >> rules.props
|
||||
echo "http.services.${ruleId}.loadBalancer.servers.0.url: ${internalScheme}://${backendHost}:${internalPort}" >> rules.props
|
||||
fi
|
||||
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue