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

Setting ENV variables at startup? #374

Closed
NielsKSchjoedt opened this issue Aug 24, 2012 · 3 comments
Closed

Setting ENV variables at startup? #374

NielsKSchjoedt opened this issue Aug 24, 2012 · 3 comments

Comments

@NielsKSchjoedt
Copy link

Is it possible to set ENV variables at startup from the procfile, just like you could do with a rake task:

worker: bundle exec rake resque:work NEWRELIC_ENABLE=false

But with sidekiq?

The reason: I need to completely disable new_relic for background tasks ONLY

@betelgeuse
Copy link
Contributor

Doesn't foreman just pass the command to the shell so you can do:

worker: ANY_ENV_VARIABLE=foo any_command

@betelgeuse
Copy link
Contributor

Apparently not. Any way just prepend the command with env and it will work:

worker: env ANY_ENV=foo any_command

@NielsKSchjoedt
Copy link
Author

You saved my day!

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

No branches or pull requests

2 participants