-
-
Save fredr/d58f8221b813e4fdcf7bbfc08df30afa to your computer and use it in GitHub Desktop.
nginx websocket resident memory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nginx:latest | |
RUN apt-get update | |
RUN apt-get -y install procps htop | |
COPY nginx.conf /etc/nginx/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 1; | |
error_log /dev/stdout info; | |
worker_rlimit_nofile 500000; | |
events { | |
worker_connections 500000; | |
} | |
http { | |
upstream app { | |
server 172.17.0.1:5000; | |
} | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
listen 8080; | |
server_name _; | |
location / { | |
access_log off; | |
proxy_pass http://app; | |
proxy_read_timeout 60m; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_http_version 1.1; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment