##
## this is the all-in-one, standalone Discourse Docker container template
+
+# You may add rate limiting to by commenting out the ratelimited template.
+# Out of the box it allows 12 reqs a second per ip, and 100 per minute per ip
+# This is configurable by amending the params in this file
+
templates:
- "templates/postgres.template.yml"
- "templates/redis.template.yml"
- "templates/web.template.yml"
- "templates/sshd.template.yml"
+ #- "templates/web.ratelimited.template.yml"
## which TCP/IP ports should this container expose?
expose:
filename: "/etc/nginx/conf.d/discourse.conf"
from: /server.+{/
to: |
- limit_req_zone $binary_remote_addr zone=flood:10m rate $reqs_per_secondr/s;
- limit_req_zone $binary_remote_addr zone=bot:10m rate $reqs_per_minuter/m;
+ limit_req_zone $binary_remote_addr zone=flood:10m rate=$reqs_per_secondr/s;
+ limit_req_zone $binary_remote_addr zone=bot:10m rate=$reqs_per_minuter/m;
server {
- replace:
filename: "/etc/nginx/conf.d/discourse.conf"