cenk1cenk2/nginx-ingress
Load balances multiple docker containers through Nginx streams.
416
Nginx ingress controller for docker-compose stacks, where it takes in a JSON environment variable for the defined containers and load-balances them through streams of Nginx.
You can run this application as a docker-compose
stack. The image is hosted as cenk1cenk2/nginx-ingress
on DockerHub. Check out the docker-compose file for example configuration.
NGINX_INGRESS
The environment variable NGINX_INGRESS
is an array of objects in the JSON form to define the endpoints and load-balanced containers.
[
{
"server": {
"listen": "string", // listen port and type for endpoint
"options": {
// key-value pairs of options that should be passed to "server" configuration of Nginx
}
},
"upstream": {
"servers": [
// string slice of balanced servers
],
"options": {
// key-value pairs of options that should be passed to "upstream" configuration of Nginx
}
}
}
]
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$NGINX_INGRESS | The configuration for the ingress operation of Nginx. | String json({ server: struct { listen: string, options: map[string]string }, upstream: struct { servers: []string, options: map[string]string } }) | true |
Flag / Environment | Description | Type | Required | Default |
---|---|---|---|---|
$LOG_LEVEL | Define the log level for the application. | String enum("panic", "fatal", "warn", "info", "debug", "trace") | false | info |
$ENV_FILE | Environment files to inject. | StringSlice | false |
docker pull cenk1cenk2/nginx-ingress