SERVICE_BY_NAME Configure as reverse proxy upstream the Hostname value from SERVICE_NAME if set to
1 or true else use the IP address value from <SERVICE_NAME>_SERVICE_HOST. (Defaults: 1)
SERVICE_NAME: Name of Service to be configured as reverse proxy. (Manadatory)
SERVICE_PROTO: Upstream service protocol to be configured as reverse proxy. (Defaults: http)
<SERVICE_NAME>_SERVICE_HOST: Service Hostname or IP to be configured as reverse proxy upstream as generated by Kubernetes when the target service is placed in the same namespace as the Nginx Reverse-Proxy service. (Manadatory)
<SERVICE_NAME>_SERVICE_PORT: Service Port to be configured as reverse proxy upstream as generated by Kubernetes when the target service is placed in the same namespace as the Nginx Reverse-Proxy service. (Defaults: "")
The name of the host and port environment variable are dependent on the provided SERVICE_NAME value; i.e. if SERVICE_NAME=test then the service Hostname is test and the service IP address is lookedup in TEST_SERVICE_HOST environment variable while the Port number is lookedup in TEST_SERVICE_PORT environment variable.
The service name is uppercased and - is replaced with _ when generating the environment variable name.
NGINX_SETUP_SCRIPT: If this value points to an executable script present in the container instance then it will be executed before Nginx is started. (Defaults: empty)
NGINX_SEND_TIMEOUT: Sets a timeout for transmitting a response to the client. (Defaults: 60s)
NGINX_SENDFILE: Enables or disables the use of sendfile. Nginx option enables to use of sendfile(2) for everything related to… sending file. (Defaults: off)
NGINX_TCP_NODELAY: Activating TCP_NODELAY forces a socket to send the data in its buffer, whatever the packet size. (Defaults: off)
NGINX_TCP_NOPUSH: Enables or disables the use of the TCP_NOPUSH. tcp_nopush works as an opposite to tcp_nodelay. Instead of optimizing delays, it optimizes the amount of data sent at once. (Defaults: off)
NGINX_KEEP_ALIVE_TIMEOUT: The first parameter sets a timeout during which a keep-alive client connection will stay open on the server side. The zero value disables keep-alive client connections. (Defaults: 75s)
NGINX_CLIENT_HEADER_TIMEOUT: Defines a timeout for reading client request header. (Defaults: 8s)
NGINX_LARGE_CLIENT_HEADER_BUFFERS_NUMBER: Sets the maximum number and size of buffers used for reading large client request header. (Defaults: 4)
NGINX_LARGE_CLIENT_HEADER_BUFFERS_SIZE: Sets the maximum size of buffers used for reading large client request header. (Defaults: 8k)
NGINX_CLIENT_BODY_TIMEOUT: Defines a timeout for reading client request body. The timeout is set only for a period between two successive read operations, not for the transmission of the whole request body. (Defaults: 8s)
NGINX_CLIENT_BODY_BUFFER_SIZE: Sets buffer size for reading client request body. In case the request body is larger than the buffer, the whole body or only its part is written to a temporary file. (Defaults: 1k)
NGINX_HTTPS_ENABLED: Enable Nginx as HTTPS proxy server to listen on port 8443 if value is 1. (Defaults: 0)
NGINX_SSL_DH_SIZE: Specifies the bit size of DH parameters. (Defaults: 128)
NGINX_SSL_DH_PATH: Path to DH parameters file. (Defaults: /etc/nginx/certs/dh.pem)
NGINX_SSL_CERT_PATH: Specifies a file with the certificate in the PEM format. If certificate file is not found then a new one is generated. (Defaults: /etc/nginx/certs/cert.pem)
NGINX_SSL_KEY_PATH: Specifies a file with the secret key in the PEM format. If secret key file is not found then a new one is generated. (Defaults: /etc/nginx/certs/cert.key)
Create a new Docker container that inherits FROM iconoeugen/docker-nginx and add the DH parameters, certificate and secret key files in the container during build phase.
Mount the file in the Docker container running instance and configure the environment variables to point to the DH parameters, certificate and secret key files.
The DH parameters, certificate and secret key files can be mounted as secrets and the environment variables configured to point to the secret files path.