Add support for configurable NGINX_TIMEOUT environment variable.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-03-05 19:59:31 -06:00
parent 82ed6f651b
commit 61be661f55
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
5 changed files with 11 additions and 3 deletions

View File

@ -24,6 +24,7 @@ services :
- letsencrypt_html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
environment :
NGINX_TIMEOUT : ${NGINX_TIMEOUT:-1800}
DEFAULT_HOST : ${LETSENCRYPT_HOST:-azuracast.local}
networks :
- frontend
@ -63,6 +64,7 @@ services :
AZURACAST_VERSION : ${AZURACAST_VERSION:-latest}
AZURACAST_SFTP_PORT : ${AZURACAST_SFTP_PORT:-2022}
VIRTUAL_HOST : ${LETSENCRYPT_HOST:-azuracast.local}
NGINX_TIMEOUT : ${NGINX_TIMEOUT:-1800}
LETSENCRYPT_HOST : ${LETSENCRYPT_HOST}
LETSENCRYPT_EMAIL : ${LETSENCRYPT_EMAIL}
volumes :

View File

@ -3,4 +3,6 @@ COMPOSE_PROJECT_NAME=azuracast
AZURACAST_HTTP_PORT=80
AZURACAST_HTTPS_PORT=443
AZURACAST_SFTP_PORT=2022
AZURACAST_SFTP_PORT=2022
NGINX_TIMEOUT=1800

View File

@ -110,7 +110,7 @@ server {
fastcgi_param DOCUMENT_ROOT $realpath_root;
include fastcgi_params;
fastcgi_read_timeout 1800;
fastcgi_read_timeout {{ default .Env.NGINX_TIMEOUT "1800" }};
fastcgi_buffering off;
internal;

View File

@ -7,7 +7,7 @@ $minimal_apt_get_install nginx nginx-common nginx-extras openssl
# Install nginx and configuration
cp /bd_build/nginx/nginx.conf /etc/nginx/nginx.conf
cp /bd_build/nginx/azuracast.conf /etc/nginx/conf.d/azuracast.conf
cp /bd_build/nginx/azuracast.conf.tmpl /etc/nginx/azuracast.conf.tmpl
mkdir -p /etc/nginx/azuracast.conf.d/

View File

@ -0,0 +1,4 @@
#!/bin/bash
# Copy the nginx template to its destination.
dockerize -template "/etc/nginx/azuracast.conf.tmpl:/etc/nginx/conf.d/azuracast.conf"