Runtime-only environment variables

I want an environment variable I can change without rebuilding. When changed, it would restart my web service with the newest cached build.

Hi Alec,

Thanks for reaching out.

Currently a service env var change will trigger a new deploy. There’s a feature request on our feedback site that may relate to this: Ability to restart servers you can upvote/comment to be notified of updates. If that’s not quite the feature you’re looking for, please feel free to add your own.

If you only want an env var to exist at runtime, one way to achieve this would be to include it in your Start Command, e.g.

MY_RUNTIME_VAR=foo my_app_start_command

However, changing the Start Command will also currently trigger a new deploy.

Hope that helps

Alan

I should explain my use case.

I’m facing a production only bug in my web service, and the development cycle would be faster if a new build wasn’t required when I set the DEBUG environment variable.

I agree, that’s a fair use case, but not currently possible. It does sound like the “Ability to restart servers” feature request fits how you want it to behave, if you have time, maybe add that explanation there to give it some more example use-cases.

Alan