Create Cert by Lets’s Encrypt

  1. Create cert by docker compose
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    services:
    certbot:
    image: certbot/certbot
    container_name: certbot
    ports:
    - "80:80"
    volumes:
    - ./certbot/conf:/etc/letsencrypt
    - ./certbot/lib:/var/lib/letsencrypt
    command: >
    certonly --standalone
    --non-interactive
    --agree-tos
    --email you@example.com
    -d example.com
1
docker compose up certbot

create cert

  1. Renew cert
    1
    docker compose up certbot