A Docker repository to compile Alpine NGINX with 'nginx-module-stream-sts' and 'nginx-module-sts'
Will compile Alpine Nginx Container with the following NGINX modules:
The core of the Dockerfile
was taken from:
- Edit or replace the
nginx.conf
file found in the repo (will not work as-is) - Run the following commands to build and run
abenincasa@computer:~/nginx-module-stream-sts$ docker build -t "nginx:stream" .
abenincasa@computer:~/nginx-module-stream-sts$ docker run -p 80:80 -p 443:443 nginx:stream
The current nginx.config
file included in the repo is configured as a TCP Load Balancer.
To use the current config file for this purpose edit the server link to point to a backend server(s) and port accepting
TCP traffic.
To understand more about NGINX TCP/UDP Load Balancing reference: Nginx Load Balancing
stream {
server_traffic_status_zone;
upstream backend {
# change these to point to your backend servers
server XXX.XXX.XXX.XXX:443 max_fails=3 fail_timeout=10s;
server XXX.XXX.XXX.XXX:443 max_fails=3 fail_timeout=10s;
server XXX.XXX.XXX.XXX:443 max_fails=3 fail_timeout=10s;
}
server {
listen 443;
proxy_pass backend;
proxy_next_upstream on;
}
}