nginx running in this image will automatically provision LetsEncrypt SSL certificate, and opens up port 443 for the domain.
In the background, there's a script that checks for changes in /etc/nginx.conf, looking for domains not yet prepared with LetsEncrypt SSL certificate.
docker run -p80:80 -p443:443 steelburn/nginx-with-letsencrypt
Edit /etc/nginx.conf, and put in a basic configuration for your domain. Do not put your virtual host in /etc/nginx/conf.d Example:
server {
server_name abc.xyz;
location / {
proxy_pass http://another.xyz:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
These volumes can be mounted:
- /etc/nginx
- /etc/letsencrypt
- /var/www
Port 80 and 443 is exposed. Port 80 is used for both Certbot validation and insecure HTTP.
The following environment variables can be passed to the container:
- EMAIL - email address for use by LetsEncrypt notification. (optional)
Only TLS 1.2 & TLS 1.3 is enabled. We've also removed weak ciphers.