Proxy Routing
How It Works
- nginx-proxy listens on ports 80 and 443
- docker-gen watches Docker containers and generates nginx configs from
VIRTUAL_HOSTenvironment variables - acme-companion obtains Let's Encrypt SSL certificates for
LETSENCRYPT_HOSTdomains
Adding a New Service
Set these environment variables on any container:
yaml
environment:
VIRTUAL_HOST: myapp.tribewarez.com
VIRTUAL_PORT: 3000
LETSENCRYPT_HOST: myapp.tribewarez.comAttach the container to the proxy-network network, and nginx-proxy will route traffic automatically.