This repository is accompanied by a step-by-step guide on how to set up nginx and Let’s Encrypt with Docker.
init-letsencrypt.sh fetches and ensures the renewal of a Let’s
Encrypt certificate for one or multiple domains in a docker-compose
setup with nginx.
This is useful when you need to set up nginx as a reverse proxy for an
application.
-
Clone this repository:
git clone https://github.com/iZemil/ssl.git .
- Or add as a submodule:
git submodule add git@github.com:iZemil/ssl.git(git submodule update --init --recursive)
- Modify configuration:
- Add domains and email addresses to init-letsencrypt.sh
- Replace all occurrences of
bllng.comwith primary domain (the first one you added to init-letsencrypt.sh) in data/nginx/app.conf
- Run the init script:
./init-letsencrypt.sh- Run the server:
docker compose up- Check ssl certificate: https://www.ssllabs.com/ssltest/analyze.html