Created
January 6, 2019 00:36
-
-
Save wesdeveloper/714ed4712d8263b9b1ce77afc8a9002b to your computer and use it in GitHub Desktop.
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
// Nginx.config | |
worker_processes 4; | |
events { worker_connections 1024; } | |
http { | |
upstream web { | |
least_conn; | |
server web:3000 max_fails=3 fail_timeout=30s; | |
} | |
server { | |
listen 80; | |
server_name web.com ns1.locaweb.com.br; | |
location / { | |
proxy_pass http://web; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} | |
} | |
// Dockerfile nginx | |
# Set nginx base image | |
FROM nginx | |
# Copy custom configuration file from the current directory | |
COPY nginx.conf /etc/nginx/nginx.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment