Start United States USA — software How to Deploy Self-Hosted Discourse Forum With Global CDN

How to Deploy Self-Hosted Discourse Forum With Global CDN

256
0
TEILEN

In this article, see how to deploy a self-hosted Discourse forum with global CDN.
Join the DZone community and get the full member experience. Discourse is an open source forum software developed by Jeff Atwood, the co-founder of Stack Overflow. The application is written with Ruby on Rails. As a product designed for the next decade of the Internet, Discourse breaks with existing forum software by its commitment to open source, concise page style and unique content system. Famous companies like Car Talk are using Discourse to set up forums for their products. As an open source forum project, Discourse has the following highlights compared to other forums: Nebula Graph chooses Discourse for its rich plugins and the customizable forum settings. However, we are not going to introduce how to build Discourse in this post. (It’s a rather simple task, just Google it.) We will introduce how to deploy Discourse with global CDN for the Nebula Graph community. As mentioned above, Discourse provides hosting service, but we decided to self-host our forum for the following reasons: We have customized the internet settings and modified some plugins on the self-hosted forum so that our community members across the globe get to access it faster. Below is a list of what’s required for self-host a Discourse forum: Cloudflare is a global CDN service provider. In addition to the CDN service, it also provides services like DNS query, DDoS mitigation and cache acceleration service. Compared with other CDN service providers, Cloudflare provides qualified services at lower price (free most of the times). Therefore, Cloudflare has a very large user base and is our first choice. Add DNS records first, which will reduce the possibility of being rejected by the Let’s encrypt certificate in your first deployment. In the Cloudflare dashboard, click the DNS app, add Type A record and point it to the server IP. Takeaway: Don’t set the Proxy status option as Proxied because that will result in inaccessibility due to too many redirects. Enable the Proxy status setting after all configuration is finished correctly. Full and Flexible are the most commonly used SSL types in Cloudflare. We need to configure SSL before enabling the CDN. Select mode Full in the SSL/TLS dashboard. Full ensures a secure connection between both the visitor and your Cloudflare domain and between Cloudflare and your web server.

Continue reading...