Merge pull request #6083 from FinnStutzenstein/fixCaddyEntrypointForRestarts

Prevent wrong config files for caddy on container restarts (closes #6071)
This commit is contained in:
Emanuel Schütze 2021-05-27 21:13:07 +02:00 committed by GitHub
commit 37782fcae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ fi
# config: https
if [[ -n "$EXTERNAL_HTTPS_PORT" ]] ; then
cat <<EOF >> /etc/caddy/endpoint
cat <<EOF > /etc/caddy/endpoint
https://:8001 {
tls /certs/cert.pem /certs/key.pem
EOF
@ -33,7 +33,7 @@ fi
# config: https and additionally http -> create redirect-file
if [[ -n "$EXTERNAL_HTTP_PORT" ]] && [[ -n "$EXTERNAL_HTTPS_PORT" ]] ; then
cat <<EOF >> /etc/caddy/redirect
cat <<EOF > /etc/caddy/redirect
http://:8000 {
redir https://$INSTANCE_DOMAIN{uri}
}
@ -56,7 +56,7 @@ fi
# close
# }
if [[ ! -z "$ALLOWED_HOSTS" ]]; then
cat <<EOF >> /etc/caddy/invalid_host
cat <<EOF > /etc/caddy/invalid_host
@invalid-host {
not {
EOF