Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support APP_ENV? #2692

Closed
mperham opened this issue Sep 7, 2021 · 3 comments
Closed

Support APP_ENV? #2692

mperham opened this issue Sep 7, 2021 · 3 comments
Labels

Comments

@mperham
Copy link

mperham commented Sep 7, 2021

Several years ago, I added support in Sidekiq for APP_ENV as a generic replacement to RAILS_ENV and RACK_ENV. The idea being that RAILS_ENV doesn't make sense if you are using Sinatra, RACK_ENV doesn't make sense if you are using Sidekiq, etc. What we are really trying to express here is the environment specific to the running application code. This term makes sense no matter what specific framework or infrastructure the user is running.

WDYT?

@dentarg
Copy link
Member

dentarg commented Sep 7, 2021

I'm 👍 on APP_ENV. Supported in Sinatra since v2.0.0. More related previous discussion: sinatra/sinatra#984

@nateberkopec
Copy link
Member

What precedence/order would we go with?

@mperham
Copy link
Author

mperham commented Sep 7, 2021

jacobherrington added a commit to jacobherrington/puma that referenced this issue Sep 17, 2021
Using APP_ENV to set the environment is supported by Sinatra and
Sidekiq, so it makes sense to support the same behavior in Puma.

Like Sidekiq, APP_ENV will take precendence over RACK_ENV and RAILS_ENV.
APP_ENV defers to any argument passed via the --environment flag.

Solves: puma#2692
jacobherrington added a commit to jacobherrington/puma that referenced this issue Sep 17, 2021
Using APP_ENV to set the environment is supported by Sinatra and
Sidekiq, so it makes sense to support the same behavior in Puma.

Like Sidekiq, APP_ENV will take precendence over RACK_ENV and RAILS_ENV.
APP_ENV defers to any argument passed via the --environment flag.

Closes puma#2692
jacobherrington added a commit to jacobherrington/puma that referenced this issue Sep 17, 2021
Using APP_ENV to set the environment is supported by Sinatra and
Sidekiq, so it makes sense to support the same behavior in Puma.

Like Sidekiq, APP_ENV will take precedence over RACK_ENV and RAILS_ENV.
APP_ENV defers to any argument passed via the --environment flag.

Closes puma#2692
JuanitoFatas pushed a commit to JuanitoFatas/puma that referenced this issue Sep 9, 2022
Using APP_ENV to set the environment is supported by Sinatra and
Sidekiq, so it makes sense to support the same behavior in Puma.

Like Sidekiq, APP_ENV will take precedence over RACK_ENV and RAILS_ENV.
APP_ENV defers to any argument passed via the --environment flag.

Closes puma#2692
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants