for all the settings flagged with shadowed_by_global can be passed in via env:
https://github.com/discourse/discourse/blob/master/config/site_settings.yml#L12-L14
Any settings that are not can be amended either via server api or you could include a script to change them. If you must amend the defaults you would need to create a custom plugin.