Skip to content

Load application via environment file#340

Merged
benmelz merged 7 commits intomainfrom
benmelz/environment
Apr 21, 2026
Merged

Load application via environment file#340
benmelz merged 7 commits intomainfrom
benmelz/environment

Conversation

@benmelz
Copy link
Copy Markdown
Member

@benmelz benmelz commented Apr 3, 2026

As in the other sinatra apps - precursor to credentials

Comment thread config/deploy.rb
Comment on lines -10 to -11
set :app_env, fetch(:stage)
set :default_env, { APP_ENV: fetch(:app_env) }
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get what's going on here, but conversely I'm not sure where exactly RACK_ENV=production happens in the other apps...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the other apps are either a) Rails apps where capistrano/rails takes care of it, or b) apps where the "environment" doesn't matter for anything done during deployment. I think the reason for this setting was to allow us to run rake tasks (compile assets) with only production gems available, given that the Rakefile conditionally refers to RSpec, Rubocop, etc.

@benmelz benmelz merged commit 89aaf05 into main Apr 21, 2026
1 check passed
@benmelz benmelz deleted the benmelz/environment branch April 21, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants