nearform / titus

Deploy useful features in sprint one
https://nf-titus.netlify.app
Apache License 2.0
61 stars 43 forks source link

Devise a new mechanism to detect in which environment the application is running #1484

Closed hails closed 2 years ago

hails commented 2 years ago

Currently, we're relying on NODE_ENV to detect in which environment a titus application is running. For example, I've recently introduced a change on how we detect if the application is running in a production environment. One approach would be setting a custom environment variable instead.

hails commented 2 years ago

cc @mcollina

simoneb commented 2 years ago

please reference your other PR so it's easier to see all the current occurrences where it is being used

mablanco commented 2 years ago

Just my two cents. In past projects, a custom envvar was precisely what developers and devops agreed on to detect the runtime environment. I've seen this work with Java, Python, .Net and, of course, Node. One of its main advantages is that is compatible with many popular infra platforms, including Docker/Kubernetes and public clouds.

fahric commented 2 years ago

assignee: @fahric

fahric commented 2 years ago