There are a few values that I need to setup in the config.yml file that I’d like to read from environment variables, rather than having them saved and committed to our repo.
Does the config.yml support some sort of template that I can use for it?
There are a few values that I need to setup in the config.yml file that I’d like to read from environment variables, rather than having them saved and committed to our repo.
Does the config.yml support some sort of template that I can use for it?
I don’t think it does but you can read them in sentry.conf.py
file. There are also some environment variables that Sentry automatically reads and honors. Which ones you have in mind?
Basically I need to setup Redis host, the github-app.xyz
used for Login with Github, and the secret key.
Are you saying that I don’t actually need to use config.yml
and I can set all these variables in the sentry.conf.py
?
Oh, all those are already supported via environment variables. Just take a look at https://github.com/getsentry/onpremise/blob/master/sentry.conf.py, especially to the comments at the very beginning that lists all supported env variables.
@BYK do you know anything about the migration to config.yml
stated here https://docs.sentry.io/server/warnings/?
The following will be a simple mapping of old (
sentry.conf.py
) keys to new (config.yml
). Old settings should be completely removed.
If that’s the case, how would one keep EMAIL_HOST_PASSWORD
a secret?
Thanks
They are already not very secret if you are passing them to Docker via .env
file or with environment variables, they are not safer than just baking them into the image by setting them in the config.yml
file at image build time.
We may look into using Docker secrets in the future for this. Also, the sentry.conf.py
file is still supported for now if environment variables are your preferred way of transport.