jwilder nginx docker reverse proxy with acme companion
|
2 years ago | |
---|---|---|
utils | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
docker-compose.yml | 2 years ago |
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.conf
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
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.