jwilder nginx docker reverse proxy with acme companion
| 
				
					 | 
			3 年 前 | |
|---|---|---|
| utils | 3 年 前 | |
| .gitignore | 3 年 前 | |
| README.md | 3 年 前 | |
| docker-compose.yml | 3 年 前 | 
nginx-proxy acts as reverse proxy. The nginx configs get automatically created based on environment variables.
jrcs/letsencrypt-nginx-proxy-companion obtains certificates from letsencrypt used by the revsers proxy.
./data/conf.d/mailcow_proxy.conf or delete it when not using mailcowconf.d subfolder: ln ../mailcow_proxy.conf mailcow_proxy.confTo 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
echo "someusername:"echo "somepassword" openssl passwd -stdin> ./data/htpasswd/www.example.com
to enable basic auth for a vhost
or use the bash script in ./utils/setup_basic-auth.sh
Both containers listen on /var/run/docker.sock to see the environment variables of new containers coming up.
When changing domains while moving from development to production, perform a docker system prune prior to restarting the service.