Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (20 sloc) 618 Bytes
user nginx;
worker_processes 2;
events {
worker_connections 1024;
}
http {
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
# 127.0.0.11 is the address of the Docker embedded DNS server https://docs.docker.com/engine/userguide/networking/dockernetworks/#docker-embedded-dns-server
# set valid low to avoid caching IP addresses and demonstrate DNS round robin of the apps alias
resolver 127.0.0.11 valid=1s;
server {
listen 80;
# apps is the name of the network alias in Docker
set $alias "apps";
location / {
proxy_pass http://$alias:8080;
}
}
}