Linux/Docker/Letsencrypt: Difference between revisions
(Die Seite wurde neu angelegt: „ Category:Linux/Docker Category:Linux“) |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== docker-compose.yml == | |||
<pre> | |||
version: '3' | |||
services: | |||
certbot: | |||
image: certbot/certbot:latest | |||
container_name: certbot | |||
volumes: | |||
- /srv/docker-data/certbot/webroot:/var/www | |||
- /srv/docker-data/certbot/etc:/etc/letsencrypt | |||
</pre> | |||
== domains.sh == | |||
<pre> | |||
#!/usr/bin/env bash | |||
certdomains="domain1.com,\ | |||
domain2.com" | |||
</pre> | |||
== extend-domains.sh == | |||
<pre> | |||
#!/bin/bash | |||
source domains.sh #loading $certdomains | |||
docker-compose run certbot certonly --dry-run --extend --agree-tos --email letsencrypt@aol.com --non-interactive --webroot --webroot-path /var/www -d $certdomains | |||
</pre> | |||
== renew.sh == | |||
<pre> | |||
#!/bin/bash | |||
docker-compose run certbot renew --dry-run | |||
</pre> | |||
== Old Setup == | |||
<pre> | |||
certbot certonly --agree-tos --email email@aol.com --non-interactive --webroot --webroot-path --domains DOMAINS (--dry-run) | |||
</pre> | |||
Latest revision as of 17:20, 26 March 2020
docker-compose.yml
version: '3' services: certbot: image: certbot/certbot:latest container_name: certbot volumes: - /srv/docker-data/certbot/webroot:/var/www - /srv/docker-data/certbot/etc:/etc/letsencrypt
domains.sh
#!/usr/bin/env bash certdomains="domain1.com,\ domain2.com"
extend-domains.sh
#!/bin/bash source domains.sh #loading $certdomains docker-compose run certbot certonly --dry-run --extend --agree-tos --email letsencrypt@aol.com --non-interactive --webroot --webroot-path /var/www -d $certdomains
renew.sh
#!/bin/bash docker-compose run certbot renew --dry-run
Old Setup
certbot certonly --agree-tos --email email@aol.com --non-interactive --webroot --webroot-path --domains DOMAINS (--dry-run)