-
Notifications
You must be signed in to change notification settings - Fork 483
foreman module exports using the development environment #135
Description
When deploying a Rails application with a procfile using the foreman module, the commands are run without setting the environment in any way. I looked through the module code and there is no mention of the environment variable anywhere.
As far as I know, there is no way to set the environment (at least I haven't found it) for foreman other than regular environment variables before running the command. e.g. RAILS_ENV=production bundle exec foreman ... but we should be able to set it somehow when deploying a Rails application.
For example, we could prefix the export_cmd with RAILS_ENV=#{rails_env} if the setting is set in deploy.rb
Currently, my background jobs crash because they attempt to start up using the development environment, but I only have the production environment set up on my server. The only choices I see so far are patching mina's foreman module or running the commands manually.