misc: fix handling boolean values

Fixes: https://github.com/jitsi/docker-jitsi-meet/issues/30
This commit is contained in:
Saúl Ibarra Corretgé
2019-01-28 23:11:03 +01:00
parent e3583c72a6
commit 30c425811e
6 changed files with 8 additions and 8 deletions

View File

@@ -1,14 +1,14 @@
server {
listen 80 default_server;
{{ if .Env.ENABLE_HTTP_REDIRECT }}
{{ if .Env.ENABLE_HTTP_REDIRECT | default "0" | toBool }}
return 301 https://$host$request_uri;
{{ else }}
include /config/nginx/meet.conf;
{{ end }}
}
{{ if not .Env.DISABLE_HTTPS }}
{{ if not (.Env.DISABLE_HTTPS | default "0" | toBool) }}
server {
listen 443 ssl;

View File

@@ -7,7 +7,7 @@ ssl_session_tickets off;
ssl_dhparam /config/nginx/dhparams.pem;
# ssl certs
{{ if .Env.ENABLE_LETSENCRYPT }}
{{ if .Env.ENABLE_LETSENCRYPT | default "0" | toBool }}
ssl_certificate /etc/letsencrypt/live/{{ .Env.LETSENCRYPT_DOMAIN }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ .Env.LETSENCRYPT_DOMAIN }}/privkey.pem;
{{ else }}