Created
August 27, 2014 20:53
-
-
Save kikicarbonell/7625d8669bd0caa3cc7a to your computer and use it in GitHub Desktop.
/etc/nginx/nginx.conf
This file contains hidden or 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
# required to run in a container | |
daemon off; | |
user www-data; | |
worker_processes 4; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 768; | |
# multi_accept on; | |
} | |
http { | |
# basic settings | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
types_hash_max_size 2048; | |
server_names_hash_bucket_size 64; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
# send logs to STDOUT so they can be seen using 'docker logs' | |
access_log /dev/stdout; | |
error_log /dev/stdout; | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
## start deis-controller | |
upstream deis-controller { | |
server 172.17.8.100:8000; | |
} | |
server { | |
server_name ~^deis\.(?<domain>.+)$; | |
server_name_in_redirect off; | |
port_in_redirect off; | |
location / { | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_redirect off; | |
proxy_connect_timeout 10s; | |
proxy_send_timeout 1200s; | |
proxy_read_timeout 1200s; | |
proxy_pass http://deis-controller; | |
} | |
} | |
## end deis-controller | |
## start service definitions for each application | |
## end service definitions for each application | |
# healthcheck | |
server { | |
listen 80 default_server; | |
location /health-check { | |
default_type 'text/plain'; | |
access_log off; | |
return 200; | |
} | |
} | |
} | |
## start builder | |
tcp { | |
access_log /dev/stdout; | |
tcp_nodelay on; | |
timeout 1200000; | |
# same directive names, but these are in miliseconds... | |
proxy_connect_timeout 10000; | |
proxy_send_timeout 1200000; | |
proxy_read_timeout 1200000; | |
upstream builder { | |
server 172.17.8.100:2223; | |
} | |
server { | |
listen 2222; | |
proxy_pass builder; | |
} | |
} | |
## end builder |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment