-
Notifications
You must be signed in to change notification settings - Fork 308
port from swaddle to honcho #468
Comments
Afaict, the one feature that swaddle has that foreman doesn't is to take environment definition from stdin (ddollar/foreman#308). This is used in payday.sh to take production configuration piped from Unfortunately, there's 21 open pull requests, and it sounds like foreman is rather neglected. :-/ |
Can we kludge this use case using env(1)? |
Got a response from @ddollar, thankfully: |
One good reason to do this is to suppress dev/production mismatch bugs. I just hit one on DataDirect (YouGov project) where I have a similar setup. I made a change to the Makefile run target, but forgot to change the Procfile. It'd be better to just use the Procfile. |
Since foreman supports the use environment files via -e, couldn't we already port over to it? I'm not sure ddollar/foreman#308 is really a blocker in any way, because you could just redirect the output of heroku config to an env file that you then load via foreman start -e, or alternatively do:
(heroku config -s outputs the heroku config in shell format) |
@joonas Does it really work to pipe export like that?
If so let's do it! This is the sort of solution I was grasping at above with the "kludge using env" comment. |
Hmm, actually you're right, it doesn't work like that. I guess you'd still have to redirect the output to a file and then run the command loading that file.. I'll see if I can come up with something else :) |
I'd prefer not to risk having production configuration in a local file, that's why I'm looking for a piping solution. |
Hmm, alright, I'll see if I can figure something out in that case. |
Ah yes, I'm not sure what I was thinking before... So what you could do is this:
Just to prove that it works, run for example:
|
!m @joonas Let's proceed with this. |
I've withdrawn ddollar/foreman#308. |
Hrm ... the problem with this is that it puts sensitive configuration in your current shell environment, which is almost as bad as leaving it lying around in a file. Surely there's a way to do this properly using Unix tools. |
will work as long as foreman only reads the input file once. |
@pjz That's a little better. You can control the permissions on |
foreman_stdincfg script is:
then call |
Or just do:
!m @pjz. :) |
Okay, full steam ahead! |
👍 |
I expect that to maintain Windows portability we're going to want to go with Honcho. |
This was the big one. The others in the Makefile (though cf. #426) should be easy.
Can we just use |
I don't see how. Is Windows support a necessity? If so, we could go back to |
@zwn The one caveat is that Heroku uses foreman (they wrote it), so we'll have a difference between dev and production there. |
@zwn Also, make sure we that |
@whit537 Actually, why don't we run payday on heroku? Heroku has the ability to run 'workers' and it picks up the production configuration 'by itself'. We can use either one-off-dynos or regular workers (https://devcenter.heroku.com/articles/process-model, https://devcenter.heroku.com/articles/procfile). |
Payday isn't the only place we use Anyway, I checked, and honcho does support |
I'm raising this to DevX ★. @D-Land and Alex (what's his GitHub?) hit this the other night at Open Hack, and it shouldn't actually be that much work to resolve. |
Updated title and description to dictate honcho, to keep with a Python dev stack. Tradeoff: some variance from production, but a cleaner (Python) dev story. |
I don't see why it should be DevX ★. It works the way it is. We have a lots |
That much I figured from the previous comment. What I failed to understand |
@zwn Both @D-Land and @alexvallejo are in a software testing class with @laboon. I was explaining to them how to run tests using I've dropped this back to DevX. :-) |
... and have raised #1887 to DevX★. |
@zwn It's a win for two reasons.
And like @whit537 said, testing with test.py makes sense. No need to explain anything. |
Done by #1974. |
There's a swaddle utility in Aspen/Gittip that duplicates some of the behavior of foreman. Let's try to use
foreman, or maybehoncho.The text was updated successfully, but these errors were encountered: