-
Notifications
You must be signed in to change notification settings - Fork 796
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
Captain Definition file does not exist (but it does!) #109
Comments
@drmrbrewer, did you add and commit the |
Thanks @gnuns again! Either you didn't commit your captain-definition file or it's in a wrong place. You can double check by running
and then open test.tar to make sure you can see
|
OK thanks, that must be it. I haven't yet committed the definition file. Perhaps it's worth making that clear in the readme? Maybe I was just being dumb, but it seems like an easy mistake to make, if you're just trying out captain briefly on your own project, by dumping a definition file and deploying. |
And I note that the CLI gives the following info when deploying:
I suppose I passed over that because I didn't realise that the definition file itself needs to be "pushed to the server"... my assumption was that this is purely a local config file and it doesn't matter that it hasn't been committed. |
Now it proceeds further, but it chokes with the following errors (which doesn't happen when deploying to heroku)... any ideas?
|
It's NodeJS Docker alpine image issue, see: nodejs/docker-node#384 (comment) Change your captain-definition file to this:
|
Thanks, @githubsaturn, I'll try that. Hope you don't mind another quick question... it's not captain-specific I suppose, it's more that I'm a noob to docker... my node app needs phantomjs installed, which in heroku I achieve via a buildpack. With captain/docker, my thinking is that I can use something like this... how do I add this to the captain deploy procedure? |
And I'm now getting a rather uninformative build failure error:
|
Please include your package.json |
|
I've put together a small test project using your package and it works perfectly file: Note that it might be due to some RAM usage, see this: https://github.com/githubsaturn/captainduckduck/wiki/Getting-Started#b-server-with-a-public-ip My instance has 2GB of RAM. As for buildpacks, they are nothing more than dockerfile lines. For example, for your PhantomJS, you have two options:
https://github.com/wernight/docker-phantomjs/blob/master/Dockerfile Make sure to replace the line ( PS: convert dockerfile to captain-definition https://jsbin.com/zehunuwoqe |
This is the captain-definition file that you should use:
|
Thanks for the help with phantomjs... I'll try that out. Concerning the build problem I was having... you're right... I resized the server and ran the build again, and it worked... well the build was successful but when I try to access the node app via the URL I get the following in the browser:
I have not messed with nginx at all, nor have I done any clustering of nodes... just one node at present. And (to rule out that resizing the server messed something up) I also tried starting from scratch... completely new server created (on digitalocean) and set up with captain, with a fresh deploy of the node app. Still I get the "bad gateway" error. |
Ahhh my bad! Sorry! I forgot to add the last lines from #109 (comment) to your dockerfile, see below for the new dockerfile:
|
@githubsaturn strangely, now I get the following error during deploy:
This didn't happen when I wasn't including the phantomjs lines beforehand... |
It's trial and error game. Remove these lines:
|
Is there any way to cache the phantomjs tar.bz2 file (fetched in the docker script) between deploys? It is incredibly slow fetching that (to a digitalocean droplet), and it is fetched every deploy. Is this a use-case for the persistent data area? |
And the only other thing that seems to be missing is font support. Currently, I have a bunch of font files in the .fonts folder of my project, and when this is deployed to heroku, the fonts are picked up and used within phantomjs without any apparent extra configuration required. I will try to figure it out, but you may have some idea! |
Docker caches the layers if you have use the dockerfile as I shared. For fonts, you can look up to find where PhantomJS uses fonts, let's say it turns out to be |
Regarding caching, I understand a bit more now having read this article. It does indeed use the cached binary file so long as I am not messing around with the layer concerned. As for fonts, copying the fonts into Thanks for your help, and again thanks for this awesome tool... it is really well put together. |
I got this error because I named my |
I need to have the captain-definition file in my repo? i cant just add it locally? |
Yes - it's needed on your server to build your application. |
I successfully deployed the node example from here.
But when it comes to deploying my own node app, I have a problem. I'm deploying the app from within the git repo folder which I know is working (I deploy it to heroku all the time). But when I try with captain, I get:
BUT I have put a
captain-definition
file in the folder, alongsidepackage.json
at the top level, in the folder from which I'm deploying. It has the content:The node version above matches what I have in
package.json
. The deploy process seems to be going OK until the above point... I can't understand the error because I do have a definition file... what else can I try next?The text was updated successfully, but these errors were encountered: