Matrix Docker Ansible eploy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
1.1 KiB

  1. #!/bin/bash
  2. # For renewal to work, matrix-nginx-proxy (or another webserver, if matrix-nginx-proxy is disabled)
  3. # need to forward requests for `/.well-known/acme-challenge` to the certbot container.
  4. #
  5. # This can happen inside the container network by proxying to `http://matrix-certbot:8080`
  6. # or outside (on the host) by proxying to `http://localhost:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }}`.
  7. docker run \
  8. --rm \
  9. --name=matrix-certbot \
  10. --user={{ matrix_user_uid }}:{{ matrix_user_gid }} \
  11. --cap-drop=ALL \
  12. --network="{{ matrix_docker_network }}" \
  13. -p 127.0.0.1:{{ matrix_ssl_lets_encrypt_certbot_standalone_http_port }}:8080 \
  14. -v {{ matrix_ssl_config_dir_path }}:/etc/letsencrypt \
  15. -v {{ matrix_ssl_log_dir_path }}:/var/log/letsencrypt \
  16. {{ matrix_ssl_lets_encrypt_certbot_docker_image }} \
  17. renew \
  18. --non-interactive \
  19. --work-dir=/tmp \
  20. --http-01-port 8080 \
  21. {% if matrix_ssl_lets_encrypt_staging %}
  22. --staging \
  23. {% endif %}
  24. --quiet \
  25. --standalone \
  26. --preferred-challenges http \
  27. --agree-tos \
  28. --email={{ matrix_ssl_lets_encrypt_support_email }}