-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Support running Procfile commands using dokku run
#2018
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
Support running Procfile commands using dokku run
#2018
Conversation
| is_image_herokuish_based "$IMAGE" && local EXEC_CMD="/exec" | ||
|
|
||
| # TODO: should we cleanup the procfile after run? | ||
| extract_procfile "$APP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josegonzalez @michaelshobbs I noticed that Procfiles are cleaned up after deployment. To be able to read the Procfile on dokku run I had to extract it first. Is this desirable? Unfortunately it yields a log message which is a bit distracting: -----> App Procfile file found (/home/dokku/nodejs/DOKKU_PROCFILE).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could set $DOKKU_QUIET_OUTPUT before the call and unset it afterwards. shrug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or just set it for that command:
DOKKU_QUIET_OUTPUT=1 extract_procfile "$APP"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah cool, added that.
032790d to
aa23ef8
Compare
aa23ef8 to
e64daa1
Compare
There may be a bug in Herokuish that messes up with quoted named arguments, see discussion in dokku#2018
768358b to
f073ebe
Compare
|
|
||
| POTENTIAL_PROCFILE_KEY="$1" | ||
| PROC_CMD=$(get_cmd_from_procfile "$APP" "$POTENTIAL_PROCFILE_KEY" || echo '') | ||
| remove_procfile "$APP" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm now cleaning up the Procfile after using it, just like deploy does.
It would be nice if get_cmd_from_procfile would take care of extracting the Procfile and cleaning it up. Potential downside of that is that if you would call it multiple times it would extract the Procfile every time, but the overhead of that is pretty small I think and also seems unlikely you would call this multiple times. What do you think @josegonzalez @michaelshobbs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, I think this is fine as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh, this seems fine to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright fine be me :-)
|
@michaelshobbs this seems good to go. Thoughts? |
As discussed in #1952.
This is just a first stab, I've got a couple of things I would like some feedback on.