Docker compose configuration for reverse proxy. Nginx proxy + letsencrypt image for renew certificates.
1.Clone repository
2.Configure environment variables
DEFAULT_HOST
- is using for set domain names.
More details https://github.com/jwilder/nginx-proxy#multiple-hosts
3.Run command
docker-compose up
4.Then start any containers you want proxied with an env vars:
VIRTUAL_HOST=youdomain.com
LETSENCRYPT_HOST=youdomain.com,www.youdomain.com,mail.youdomain.com
[email protected]
docker run -e VIRTUAL_HOST=foo.youdomain.com ...
Check docker and docker-compose version
docker --version
docker-compose --version
Check docker-compose file configuration
docker-compose config
View certificates information from letsencrypt container
docker exec nginx-letsencrypt /app/cert_status
Renew certificates in letsencrypt container
docker exec nginx-letsencrypt /app/force_renew