nginx
nginx copied to clipboard
default map needed for reverse proxy of websocket connections
When doing a reverse proxy for a site with websockets, some additional 'http' configuration is needed By providing this default generic map, the configuration can stay limited to the 'server' block but still use this 'http' variable.
Literal copy from the official documentation http://nginx.org/en/docs/http/websocket.html
It should not have any impact on performance http://nginx.org/en/docs/http/ngx_http_map_module.html Since variables are evaluated only when they are used, the mere declaration even of a large number of “map” variables does not add any extra costs to request processing.
this nginx image isn't designed to be used as a reverse proxy, we expect people to use something like traefik for local environments and ingress-nginx in productiono
We do use traefik to proxy dependent on the Host to the correct docker stack A docker stack for us usually contains 2 services, a nginx reverse proxy and an app backend. The nginx service will handle all static files, while the app handles the actual code (ruby/php/python) We are not using k8s, and deploy to a single docker server.