How to automate configuration

Once Discourse is installed a lot of things (both core Discourse and plugins) needs to be manually configured through the Settings UI which involves lots of typing and button pressing, as well as remembering where to find all those settings.
Is it possible to define these settings as part of the deployment e.g. a parameterisable script that can be run once the initial deployment is complete?

You can easily create a plugin to set “any and all” site settings very easily.

HTH

This is possible, my question would be why do you need this? Are you provisioning lots of sites?

A site backup and a copy of your app.yml is all that you need to recreate an identical site on another server.

On top of that, settings are persistent across rebuilds, so no need to worry about local upgrades on the same server.

If you need to create a site template, I believe you could achieve that with just a single backup and a template app.yml. You can modify site settings in app.yml if you choose to do so.

1 Like

We are creating a number of sites that all need different settings (branding, security setup etc.).
It’s the same things that need setting each time, just the values that they are set to are different.

Our setup is based on the bitnami containers deployed to K8S using Ansible.

1 Like

Then you can also create a YAML template as suggested and include your template with custom site settings in your container file.

Or do something similar with a plugin and read the site specific settings from a file in your shared directory or from a remote location.

You can set all site settings with ENV variables (e.g., DISCOURSE_SETTING_NAME=xxx). You can change everything via the API. And sometimes as NoBugsBunny suggests, a plugin is a good way to do it.

This is beyond the scope of the free support I offer here. I don’t recommend Bitnami, but have worked with clients who use it. I’ve done a couple GKE deployments (using supported containers built with ./launcher) and am experienced with deploying and managing Discourse with Ansible. If you need help and have a budget, please contact jay@literatecomputing.com.

1 Like