Open runemadsen opened 11 years ago
any luck on this @runemadsen ? Having the same issue myself
No, I didn't have time to look at it unfortunately.
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.
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 !
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.