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

Load correct .env on --chdir #16

Open
runemadsen opened this issue Feb 13, 2013 · 4 comments
Open

Load correct .env on --chdir #16

runemadsen opened this issue Feb 13, 2013 · 4 comments

Comments

@runemadsen
Copy link
Contributor

When you're using --chdir you often want to load the .env file in the chdir directory, not the directory foreman is run from.

I might take a stab at this.

@yanismydj
Copy link

any luck on this @runemadsen ? Having the same issue myself

@runemadsen
Copy link
Contributor Author

No, I didn't have time to look at it unfortunately.

@pitluga
Copy link
Owner

pitluga commented Aug 27, 2013

I think you have a couple of options, if you have no conflicting variables, you can load multiple .env files when you start forman

foreman start -env .env dir/.env

Otherwise, someone could take a look at adding in a dependency on something like dotenv so that subcontractor looks for a .env file after the chdir.

@yanismydj
Copy link

I have 2 rails server processes that I'm trying to run simultaneously(one is a 'fake' service layer for the other to interact with).
I'm actually using dotenv already, but I haven't managed to the second rails server instance to load up in a different environment than the first process. I'm still experimenting, if i find a solution, I'll report back. Thanks for the help @pitluga !

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

3 participants