disraptor.github.io

4. Setup Disraptor

3. Deploy Discourse with Disraptor


Before setting up Disraptor, you have to setup either a development (Setup a Discourse development environment (Ubuntu)) or a production environment (Deploy Discourse with Disraptor).


After setting up a working development or production environment for Discourse and installing the Disraptor plugin, the following steps need to be performed for Disraptor to operate reliably:

  1. Open Discourse’s settings and configure the value for “disraptor app secret key”.

    Use this secret key in your web application as a signal that the Discourse instance is properly set up and allowed to communicate with the server your web application is running on. Only if the key is correct can you be sure that requests made to the server are legitimately coming from the Discourse instance.

  2. Open Discourse’s “Plugins” page. From there, open the Disraptor plugin page.

    Configure all routes that your web application needs to expose. You can use Rails’ route syntax to configure wildcard routes like /static/*wildcard. See Rails’ documentation on dynamic path segments and wildcard path segments for more examples. Be aware that Rails can act inconsistent with the new routes right after adding it. Usually it is best to restart the Rails server after adding new routes.

Any Disraptor application is subject to a set of limitations that are necessary for Discourse and Disraptor to interact nicely: Limitations for Disraptor documents and resources