Nginx and Let’s Encrypt with Docker in Less Than 5 Minutes
<p>The other day, I wanted to <em>quickly</em> launch an nginx server with Let’s Encrypt certificates. I expected the task to be easy and straightforward. Turns out: I was wrong, it took a significant amount of time and it’s quite a bit more complicated.</p>
<p>Of course, in the grand scheme of things, it <em>is</em> pretty straightforward. But there are a couple of details you need to be aware of. The goal of this guide is to help you build a docker-compose setup that runs nginx in one container and a service for obtaining and renewing HTTPS certificates in another. <strong>Whether you’re using nginx as a proxy for your web app or just for serving static files, this guide is for you.</strong></p>
<blockquote>
<p>TL;DR: The full code from this guide is <a href="https://github.com/wmnnd/nginx-certbot" rel="noopener ugc nofollow" target="_blank">available on GitHub</a>.</p>
</blockquote>
<h2>Quick Reminder: What is docker-compose?</h2>
<p><a href="https://docs.docker.com/compose/" rel="noopener ugc nofollow" target="_blank"><em>docker-compose</em></a> is a tool for defining containers and running them. It’s a great choice when you have multiple interdependent containers but you don’t need a full-blown container cluster like Kubernetes.</p>
<p><a href="https://pentacent.medium.com/nginx-and-lets-encrypt-with-docker-in-less-than-5-minutes-b4b8a60d3a71"><strong>Read More</strong></a></p>