Endpoint specific configuration in exoframe.json
Tiim opened this issue · 3 comments
Is there a way to set environment variables for specific endpoints?
My use case is the following:
I have a test and a production server both running exoframe. Both have a different domain name and for traefik to correctly route the requests to the correct container I specified the following labels in my docker-compose.yml:
labels:
traefik.frontend.rule: 'Host:app.example.com,app.staging.com'
traefik.port: 8080
Now this isn't optimal for traefik because it tries to generate ssl certificates for both domains on the staging and on the production servers which obviously fails.
With endpoint specific env variables i could do something like this in the exoframe.json:
{
"name": "myapp",
"endpointconf": {
"exo.example.com": {
"env": {
"HOSTNAME": "app.example.com"
}
},
"exo.staging.com": {
"env": {
"HOSTNAME": "app.staging.com"
}
}
}
}
and use this in the docker-compose like this:
labels:
traefik.frontend.rule: "Host:${HOSTNAME}"
Doing it the way you describe is currently not possible.
What you could do is - create 2 different config files for production and staging, and then deploy using the specific file, i.e. exoframe -c exoframe.staging.json
Thanks. I didn't know about multiple config files.
Closing this due to inactivity. Feel free to re-open if needed.