Which settings can be configured without a container rebuild?


Quick question about the possibility of deploying the same discourse image to multiple environments (staging, beta, production etc).

I’d like to build the discourse image once in my CI/CD pipeline, push that image to a repository, and have the exact same discourse image running in all environments. I’d like the differences between environments (hostname etc) to be represented in environment variables or configuration files that are external to the container. With discourse my experience is that it is not entirely obvious which settings are baked into an image and which are safe to configure by changing the yaml without a rebuild.

Is there a list of the variables that can safely be configured in each environment without a container rebuild somewhere?

Welcome, @russellwstanley. There has been lots of discussion of people who want to be able to have a docker_compose file that solves all their problems, but it’s not quite that simple. There has been much discussion about this (that I can’t find in 30 seconds).

To see what settings you can pass to the container you can look at https://github.com/discourse/discourse/blob/master/config/discourse.config.sample and https://github.com/discourse/discourse/blob/master/config/site_settings.yml to see what can be configured with environment variables.

But some things need to be done with things like

rake db:migrate
rake assets:precompile

so even if you get an image that has all the right stuff, it’s not quite as simple as just cranking it up.


Thanks so much for your quick reply @pfaffman. I’ll take a look at those settings and see if I can make something work.

1 Like