From 6e4a3ce57dcd0f250f89edb4c441d3a340f574d1 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Fri, 7 May 2021 00:32:11 +0200 Subject: [PATCH] Use naming / eq check convention --- .env.sample | 4 ++-- compose.yml | 4 ++-- nginx.conf.tmpl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.env.sample b/.env.sample index acaddb6..68e3b97 100644 --- a/.env.sample +++ b/.env.sample @@ -20,13 +20,13 @@ SECRET_DB_PASSWORD_VERSION=v1 # If the proxy backend is enabled, nginx will proxy requests to # NGINX_WEBSEED_PROXY_URI and cache video data locally # -#NGINX_WEBSEED_PROXY_ENABLE=true +#NGINX_WEBSEED_PROXY_ENABLED=1 #NGINX_WEBSEED_PROXY_URI=https://some-bucket.s3.api-endpoint.net # If the CDN backend is enabled, nginx will respond to webseed requests # with redirects to NGINX_WEBSEED_CDN_URI instead of sending video data # -#NGINX_WEBSEED_CDN_ENABLE=true +#NGINX_WEBSEED_CDN_ENABLED=1 #NGINX_WEBSEED_CDN_URI=https://some-bucket.some-cdn.net ## E-mail settings # <= EDIT ALL THIS diff --git a/compose.yml b/compose.yml index 02f006e..15b190c 100644 --- a/compose.yml +++ b/compose.yml @@ -9,9 +9,9 @@ services: - internal environment: - DOMAIN - - NGINX_WEBSEED_CDN_ENABLE + - NGINX_WEBSEED_CDN_ENABLED - NGINX_WEBSEED_CDN_URI - - NGINX_WEBSEED_PROXY_ENABLE + - NGINX_WEBSEED_PROXY_ENABLED - NGINX_WEBSEED_PROXY_URI volumes: - /etc/timezone:/etc/timezone:ro diff --git a/nginx.conf.tmpl b/nginx.conf.tmpl index 6aedd97..bf1d381 100644 --- a/nginx.conf.tmpl +++ b/nginx.conf.tmpl @@ -211,7 +211,7 @@ http { sendfile_max_chunk 1M; # prevent one fast connection from entirely occupying the worker process. # should be > 800k. - {{ if (env "NGINX_WEBSEED_PROXY_ENABLE") }} + {{ if eq (env "NGINX_WEBSEED_PROXY_ENABLED") "1" }} proxy_connect_timeout 70; proxy_read_timeout 1200; proxy_send_timeout 1200; @@ -231,7 +231,7 @@ http { proxy_pass {{ env "NGINX_WEBSEED_PROXY_URI" }}; {{ else }} - {{ if (env "NGINX_WEBSEED_CDN_ENABLE") }} + {{ if eq (env "NGINX_WEBSEED_CDN_ENABLE") "1" }} # Use this in tandem with fuse-mounting i.e. https://docs.joinpeertube.org/admin-remote-storage # to serve files directly from a public bucket without proxying. # Assumes you have buckets named after the storage subdirectories, i.e. 'videos', 'redundancy', etc.