Docker compose wrapper for jwilder/nginx-proxy which I use primarily when developing
git clone https://github.com/DuckThom/nginx-proxy proxy
jwilder/nginx-proxy
settings and options can be found here
- Proxy-wide settings should go in
conf.d/overrides.conf
, NOT inconf.d/default.conf
as that file is auto-generated and will be overwritten when a container state changes. More info - Vhost-specific settings should go in
vhost.d/{VIRTUAL_HOST}
. If the VIRTUAL_HOST env var of a container isblaat.dev
then the config file should also be namedblaat.dev
. More info
version: '2'
services:
someWebServerContainer:
image: nginx
environment:
VIRTUAL_HOST: "app.dev" # Required for nginx-proxy
expose:
- "80"
- "443"
networks:
- default # Keep the container connected to it's own network
- proxy # The network where nginx-proxy is running
networks:
proxy:
external:
name: proxy_default