Keep development and production settings distinct
Keep development and production settings distinct.
Set the site's environment intentionally and inspect the resolved value before relying on environment-specific tools. Development behavior can include trace controls, extra browser output, and asset settings that are unsuitable for normal visitor traffic.
Keep credentials outside shared documentation and committed examples. Give local installations their own database and hostname so an ordinary test cannot target the production site by accident.
Exercise the release configuration in an acceptance environment before deploying it. Compare the resolved settings, enabled modules, and storage paths when behavior differs between environments.
Find the configuration layer to change
Distinguish global Zotonic configuration, Erlang runtime configuration, site configuration files, and module settings stored for a site. Similar setting names can exist at different layers.
Use bin/zotonic configfiles and bin/zotonic siteconfigfiles garden to locate the files that the command resolves. Use the corresponding configuration display commands to inspect the values, taking care when sharing output that may include credentials.
Check the implementation of a setting to see when it is read. Some values are consulted on each request; others are used at process or site startup.
Inspect global and site configuration
Use the command suited to the question:
bin/zotonic configfiles
bin/zotonic configtest
bin/zotonic siteconfigfiles garden
bin/zotonic siteconfig garden
configfiles and siteconfigfiles locate configuration sources. configtest checks global configuration loading. siteconfig prints the site's file-based configuration; it is not a complete dump of every database-backed module setting.
For runtime values, use the relevant model or configuration API in the running context. setconfig changes global runtime Zotonic settings without writing configuration files.
Do not share unredacted configuration output: database passwords and other secrets may be present. See Find the configuration layer to change and Change a runtime setting deliberately.