Skip to content

This template helps to add https protocol into your website and configure auto certificate renewal

Notifications You must be signed in to change notification settings

zdv-1993/letsencrypt-certbot-compose-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Instruction for Easy Let's Encrypt Configuration (for HTTPS) in Your Web Project

Motivation

The official Certbot documentation (https://certbot.eff.org/instructions) does not provide configuration examples for Docker and Docker Compose. This guide fills that gap.

How to work with this template

  1. Copy the certbot service from docker-compose.yml file

  2. Add volumes to your nginx service using docker-compose.yml example

  3. Change nginx conf, add location into your server section for port 80 and 443, which shares the location for ACME challenges location /.well-known/acme-challenge/ { root /var/www/certbot; } into 80 and 403 ports

  4. run certbot container and inside this conainer run command: certbot certonly -d yourdomain.com --webroot -w /var/www/certbot

  5. Add in 443 port server section

ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;

into nginx.conf

Requirements

docker-compose

Component Version
docker-compose >3
docker Compatible with docker-compose

About

This template helps to add https protocol into your website and configure auto certificate renewal

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published