I can use the following to print settings that were set via the
env section of my
docker exec app env | grep DISCOURSE
How can I print all the settings that are currently being used in my running instance? It doesn’t look like there’s a command for this in the
The environment variables will be access by the Rails app, you can override any environment variable declared in this file, in my guess.
This file has been truncated.
# DO NOT EDIT THIS FILE
# If you need to make changes create a file called discourse.conf in this directory with your changes
# On import this file will be imported using ERB
# Discourse supports multiple mechanisms for production config.
# 1. You can do nothing and get these defaults (not recommended, you should at least set hostname)
# 2. You can copy this file to config/discourse.conf and amend with your settings
# 3. You can pass in config from your environment, all the settings below are available.
# Append DISCOURSE_ and upper case the setting in ENV. For example:
# to pass in db_pool of 200 you would use DISCOURSE_DB_POOL=200
# All settings apply to production only
# connection pool size, sidekiq is set to 5, allowing an extra 3 for bg threads
db_pool = 8
# Database connection timeout in seconds
And perhaps you may also want to explore this:
What do you mean? Do you really mean all of the settings? There are hundreds of them as you can see at
/admin/settings. Do you mean the settings overridden with ENV variables? What you have should do that, I think.
But you can do something like this to get the settings set in the database:
docker exec -it app bash -c 'echo "SiteSetting.pluck(:name, :value)" |rails c'
To my surprise (though it made sense after thinking about it), this is just the ones that have been changed.