A bug has been reported in the Cloudflare template, causing an erroneous line to appear in /etc/nginx/conf.d/discourse.conf when rebuilding with Cloudflare support enabled. This results in the Discourse instance becoming unavailable and the production.log being flooded with errors.
Commenting out the line resolves the issue, but it’s believed that the source data at Cloudflare may have changed, potentially sending a blank row that needs trimming.
@mpalmer has acknowledged the issue and will fix it. To benefit from the fix, users will need to pull the latest discourse_docker changes. @mpalmer has since pushed an update, which can be obtained by running git pull followed by ./launcher rebuild.
@codinghorror estimates that the number of installs using the Cloudflare template is relatively low, but @Stephen notes that unless Cloudflare corrects their data, the issue may impact every install using the template.
Recent rebuilds with Cloudflare support enabled through the official template result in an erroneous line appearing in /etc/nginx/conf.d/discourse.conf:
The result is that the Discourse instance becomes unavailable, with the production.log flooded by:
invalid number of arguments in "set_real_ip_from" directive in /etc/nginx/conf.d/discourse.conf
Commenting out the line immediately resolves the issue.
Has the source data at Cloudflare changed? At the minimum it looks like they might be sending a blank row that will need trimming to avoid recurrences of this issue.
Do you have any way of telling how many installs use Cloudflare @codinghorror? Unless Cloudflare correct their data this issue is likely to impact every install which uses the template. I’d hate for others to experience the same outage and impact as we have today.
I’ve pushed an update which will fix the reported problem. A git pull should get it and a ./launcher rebuild thereafter should produce a working config.