### nginx-proxy stack 1. [nginx-proxy](https://github.com/jwilder/nginx-proxy) acts as reverse proxy. The nginx configs get automatically created based on environment variables. 2. [acme-companion](https://github.com/nginx-proxy/acme-companion/) obtains certificates from [letsencrypt](https://letsencrypt.org/) used by the revsers proxy. #### Mailcow - Edit `./data/conf.d/mailcow_proxy.conf` or delete it when not using mailcow - When missing, create a hardlink to the config living in the `conf.d` subfolder: `ln ../mailcow_proxy.conf mailcow_proxy.conf` #### Get started To use the service of this stack, add to the respective `docker-compose.yml`: ``` environment: VIRTUAL_HOST: www.example.com LETSENCRYPT_HOST: www.example.com LETSENCRYPT_EMAIL: webmaster+web-www.letsencrypt.org@example.com ``` #### Basic Auth `echo "someusername:"`echo "somepassword" openssl passwd -stdin` > ./data/htpasswd/www.example.com` to [enable basic auth for a vhost](https://github.com/jwilder/nginx-proxy#basic-authentication-support) or use the bash script in `./utils/setup_basic-auth.sh` #### Background Both containers listen on `/var/run/docker.sock` to see the environment variables of new containers coming up. #### Notes and pitfalls When changing domains while moving from development to production, perform a `docker system prune` prior to restarting the service.