summary refs log tree commit diff
diff options
context:
space:
mode:
authorkaiyou <pierre@jaury.eu>2018-02-05 21:28:15 +0100
committerkaiyou <pierre@jaury.eu>2018-02-05 21:28:15 +0100
commit81010a126e9bbcce018b104921ff5221a67f99cc (patch)
treef14689b3059bcad3309a09904bbf3ac36bf373bb
parentRemove docker related files from the python manifest (diff)
downloadsynapse-81010a126e9bbcce018b104921ff5221a67f99cc.tar.xz
Add dynamic recaptcha configuration in the Docker image
-rw-r--r--contrib/docker/README.md4
-rw-r--r--contrib/docker/conf/homeserver.yaml7
2 files changed, 11 insertions, 0 deletions
diff --git a/contrib/docker/README.md b/contrib/docker/README.md
index 73e53e4306..f4bc78908d 100644
--- a/contrib/docker/README.md
+++ b/contrib/docker/README.md
@@ -86,6 +86,10 @@ Synapse specific settings:
 * ``SYNAPSE_EVENT_CACHE_SIZE``, the event cache size [default `10K`].
 * ``SYNAPSE_REPORT_STATS``, set this variable to `yes` to enable anonymous
   statistics reporting back to the Matrix project which helps us to get funding.
+* ``SYNAPSE_RECAPTCHA_PUBLIC_KEY``, set this variable to the recaptcha public
+  key in order to enable recaptcha upon registration
+* ``SYNAPSE_RECAPTCHA_PRIVATE_KEY``, set this variable to the recaptcha private
+  key in order to enable recaptcha upon registration
 
 Shared secrets, these will be initialized to random values if not set:
 
diff --git a/contrib/docker/conf/homeserver.yaml b/contrib/docker/conf/homeserver.yaml
index 7450cc1228..6f1de24aad 100644
--- a/contrib/docker/conf/homeserver.yaml
+++ b/contrib/docker/conf/homeserver.yaml
@@ -112,10 +112,17 @@ max_spider_size: "10M"
 
 ## Captcha ##
 
+{% if SYNAPSE_RECAPTCHA_PUBLIC_KEY %}
+recaptcha_public_key: "{{ SYNAPSE_RECAPTCHA_PUBLIC_KEY }}"
+recaptcha_private_key: "{{ SYNAPSE_RECAPTCHA_PRIVATE_KEY }}"
+enable_registration_captcha: True
+recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
+{% else %}
 recaptcha_public_key: "YOUR_PUBLIC_KEY"
 recaptcha_private_key: "YOUR_PRIVATE_KEY"
 enable_registration_captcha: False
 recaptcha_siteverify_api: "https://www.google.com/recaptcha/api/siteverify"
+{% endif %}
 
 ## Turn ##