nginx reverse proxy to support https for your docker containers
- Setup mkcert
-
brew install mkcert -
mkcert -install -
mkcert localhost 127.0.0.1
-
Replace the generated
localhost+1-key.pemandlocalhost+1.pemin thecertsdirectory -
Update
proxy_passinnginx/nginx.confto whichever docker namespace your service is using (ensure you also update the port it exposes) -
Add the service to your
docker-compose.ymldocker-https/docker-compose.yml
Lines 5 to 11 in ad7aed7
-
docker-compose up -d https