2018-08-29 08:37:44 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# For renewal to work, matrix-nginx-proxy (or another webserver, if matrix-nginx-proxy is disabled)
|
|
|
|
# need to forward requests for `/.well-known/acme-challenge` to the certbot container.
|
|
|
|
#
|
|
|
|
# This can happen inside the container network by proxying to `http://matrix-certbot:80`
|
2018-12-23 11:00:12 +02:00
|
|
|
# or outside (on the host) by proxying to `http://localhost:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }}`.
|
2018-08-29 08:37:44 +02:00
|
|
|
|
|
|
|
docker run \
|
|
|
|
--rm \
|
|
|
|
--name=matrix-certbot \
|
|
|
|
--network="{{ matrix_docker_network }}" \
|
2018-12-23 11:00:12 +02:00
|
|
|
-p 127.0.0.1:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }}:80 \
|
2018-08-29 08:37:44 +02:00
|
|
|
-v {{ matrix_ssl_config_dir_path }}:/etc/letsencrypt \
|
|
|
|
-v {{ matrix_ssl_log_dir_path }}:/var/log/letsencrypt \
|
2018-12-23 11:00:12 +02:00
|
|
|
{{ matrix_ssl_lets_encrypt_certbot_docker_image }} \
|
2018-08-29 08:37:44 +02:00
|
|
|
renew \
|
|
|
|
--non-interactive \
|
2018-12-23 11:00:12 +02:00
|
|
|
{% if matrix_ssl_lets_encrypt_staging %}
|
2018-08-29 08:37:44 +02:00
|
|
|
--staging \
|
|
|
|
{% endif %}
|
|
|
|
--quiet \
|
|
|
|
--standalone \
|
|
|
|
--preferred-challenges http \
|
|
|
|
--agree-tos \
|
2018-12-23 11:00:12 +02:00
|
|
|
--email={{ matrix_ssl_lets_encrypt_support_email }}
|