ddollar / foreman

Manage Procfile-based applications
http://ddollar.github.com/foreman
MIT License
6.01k stars 630 forks source link

Environments in foreman? #762

Open stoplion opened 4 years ago

stoplion commented 4 years ago

Can Foreman take an env var from the cli?

I'm trying in several ways. Nothing seems is picking up.

For example, I need to run Rails (using Foreman) in test mode, to run some tests...

RAILS_ENV=test bundle exec foreman start
// starts in develop

bundle exec foreman -e test start
// bombs

bundle exec foreman start -e test
// bombs

I've also set up a .env.test with this in it...

RAILS_ENV=test

foreman start --env .env.test // starts in develop


What is the correct way to do this?