This repository contains Nginx and Certbot combined in Docker Compose. It contains code and instructions how can it be easily provisioned on servers.
It is a fork of nginx-compose boilerplate repository, and this fork is optimized for quick installation on servers.
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/wmnnd/nginx-certbot.git .
-
Modify configuration:
- add host configs stored in files named after each of that host suffixed with *.conf to ./nginx/conf.d;
- all host files have use certificate directory reflecting primary domain (whichever is the first while sorted them alphabetically)
-
Run the init script:
./init-letsencrypt.sh
-
Run the server:
docker-compose up
All code in this repository is licensed under the terms of the MIT License
.
For further information please refer to the LICENSE
file.