Closed naartjie closed 10 years ago
@naartjie dokku-pm2
is not completely ready, only basic version of it implemented.
There are few reasons why it doesn't work.
pm2
implementation. It didn't allow to run pm2
in process mode (only daemon), so it was impossible to use it in docker container. There is issue for that and it seems to be resolved now, but I didn't try it.dokku
0.2.x where post-build
step is not executed. I've created plugin for 0.3.x which supposed to appear really soon, but it didn't happen.default.yaml
is not implemented and probably it would not, since all you can specify inside on processes.json
.. that would just my initial idea.So, to make it useful few things need to be done.
pre-deploy
so it would work on dokku 0.2.xProcfile
it should be web: pm2 --no-daemon processes.json
to start it properly.Thanks for the quick reply @alexanderbeletsky. I have upgraded my dokku the latest version. And pm2 already has --no-deaemon
merged in.
Now I am getting this:
-----> Injecting pm2 script
remote: Unable to find image '/bin/bash' locally
remote: 2014/02/19 18:35:57 Invalid namespace name (), only [a-z0-9_] are allowed, size between 4 and 30
Any ideas? Do I need to specify somewhere that bash is one of the dependencies? I saw you opened https://github.com/progrium/dokku/issues/356 a while back, is it at all related?
@naartjie the issue you referred is not that related but it gave some clues..
I just pushed some changes, it would be nice if you try and let me know results.
Thanks again @alexanderbeletsky!! I pulled your changes in, but it's still giving that same remote: Unable to find image '/bin/bash' locally
.
BTW, I think the line in Procfile
should read web: pm2 --no-daemon start processes.json
, anyways, it's failing before that, but I just thought I'd mention it, in case someone else reads this ;-)
in post-build#L3 $IMAGE
is not getting set:
APP="$1"; IMAGE="$2"
I added an echo
after this line, and $IMAGE
was blank. Has the way it's being passed to the script changed?
damn it.. in hurry, just forgot to save that file, so changes were missing in prev commit. Please try again :)
Cool, those errors are now gone :-]
My app now deploys without errors (only warnings), but still doesn't look like it's running on the host (I've tried ps -eaf | grep pm2
and ps -eaf | grep node
just to make sure, but they are both showing nothing). I guess I now have some different issues, so I'm closing this one. Thanks for your help!!
@naartjie hey, just want to follow-up :) did you manage to run it?
@alexanderbeletsky no I did not, eventually I ditched dokku, and am just using plain vanilla digital ocean droplet + pm2, no dokku.
EDIT: thanks for checking... BTW, have you had any luck running it in any envs?
@naartjie thx for update, it's clear.. just thought to recover the project, so wanted to clarify the latest status :)
Hi.
I am getting this error as part of the
-----> Running pm2 script
, when I try togit push
to dokku:remote: /bin/bash: /app/.pm2: No such file or directory
It seems like only pre-deploy is getting invoked, and not
post-build
, as I cannot see any output of-----> Injecting pm2 script
. How can I make sure thispost-build
is also run?I should also mention that I don't have a
default.yaml
anywhere in/var/lib/dokku/plugins/
tree. Do I need to create one automatically?