caprover / caprover Goto Github PK
View Code? Open in Web Editor NEWScalable PaaS (automated Docker+nginx) - aka Heroku on Steroids
Home Page: https://CapRover.com
License: Other
Scalable PaaS (automated Docker+nginx) - aka Heroku on Steroids
Home Page: https://CapRover.com
License: Other
Hi,
great project! I want to trying. I installed it with mkdir /captain && docker run -v /var/run/docker.sock:/var/run/docker.sock dockersaturn/captainduckduck
on RancherOS, It started, but I always got the "Captain is not ready yet" message on UI login screen. The docker logs says:
October 28th 2017, 12:35:18.784 pm Emptying generated and temp folders.
October 28th 2017, 12:35:18.800 pm Ensuring directories are available on host. Started.
October 28th 2017, 12:35:18.809 pm Ensuring directories are available on host. Finished.
October 28th 2017, 12:35:18.815 pm Attaching network captain-overlay-network to service: captain-captain
October 28th 2017, 12:35:18.829 pm Error: (HTTP code 500) server error - rpc error: code = 2 desc = changing network in service is not supported
Error: (HTTP code 500) server error - rpc error: code = 2 desc = changing network in service is not supported
at /usr/src/app/node_modules/docker-modem/lib/modem.js:254:17
at getCause (/usr/src/app/node_modules/docker-modem/lib/modem.js:284:7)
at Modem.buildPayload (/usr/src/app/node_modules/docker-modem/lib/modem.js:253:5)
at IncomingMessage.<anonymous> (/usr/src/app/node_modules/docker-modem/lib/modem.js:229:14)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1057:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
POST /api/v1/login 200 30.097 ms - 59
What is the problem?
Hi, i'm looking the docs, maybe i wrong, but it seems that all service are exposed on public network, is there a way to expose only necessary service (port 80/443 only?) on public network and the other services on private?
Hi, thanks for your awesome work.
Just install CDD in my server, add a node to swarm, and try to deploy example nodejs app.
I can deploy it from the CLI. But the application after that won't automatically start.
I try to spin up the instance to 2, and it run only 1. If spin to 3, still only 1 is running, all the rest is still shutdown when I inspect by docker node ps
command. And it only run in my host manager machine without replicate it to the worker.
Besides, I tried to create mongo app with one click. Can't see the container available in docker node ps
and can't access it too.
How can I figure all of this out?
Can captain deploy ruby on rails applications?
hello when I want to use your nodeJS exemple I upload the .tar file and everything work
but when I download it , decompress it and compress it again on my computer. the upload process doesn't work at all
Error
Captain Definition file does not exist!
step to reproduce the problem
no file was removed or moved or changed
how did you compress the directory into .tar ? (software, operating system ...)
thank you.
Setup your Captain server
It should either :
And output a newline before the error message
? Have you already installed Captain on your server by running the following line:
mkdir /captain && docker run -v /var/run/docker.sock:/var/run/docker.sock dockersaturn/captainduckduck ? Yes
? Enter IP address of your captain server: (123.123.123.123) 172.104.246.242Something bad happened. Cannot connect to "http://172.104.246.242:3000/api/v1/login"
{
"statusCode": 302,
"body": "Found. Redirecting to https://172.104.246.242:3000/api/v1/login",
"headers": {
"x-powered-by": "Express",
"location": "https://172.104.246.242:3000/api/v1/login",
"vary": "Accept",
"content-type": "text/plain; charset=utf-8",
"content-length": "63",
"date": "Wed, 13 Dec 2017 13:31:59 GMT",
"connection": "close"
},
"request": {
"uri": {
"protocol": "http:",
"slashes": true,
"auth": null,
"host": "172.104.246.242:3000",
"port": "3000",
"hostname": "172.104.246.242",
"hash": null,
"search": null,
"query": null,
"pathname": "/api/v1/login",
"path": "/api/v1/login",
"href": "http://172.104.246.242:3000/api/v1/login"
},
"method": "POST",
"headers": {
"x-namespace": "captain",
"x-captain-auth": null,
"content-type": "application/x-www-form-urlencoded",
"content-length": 18
}
}
}
Is there way to stop/start/restart the app from Captain or CLI?
Even if i stop or kill remove container it gets started up again
Might be good to setup CaptainDuckDuck on Slack/Discord so we can all try to help each other. It may prevent unneeded new issues.
when attempting to login using the cli on windows 10 the client crashes with the following error:
Error: Cannot find module 'C:\Users\paul\index-login'
have posted the output to a gist here: https://gist.github.com/fusspawn/76ce58616050c1956315b026e7c03ab6
Awesome work..
My Qsn:
My node app was not coming up, coz of some code issue. I was not sure what was breaking the app.
Is there a way to check logs?
Hello!
I really enjoy your work with CaptainDuckDuck. Great job!
I am trying to use it with a node application. The back-end uses node.js and express and the front-end use Angular2.
The client side do requests to the server side through the '/api' route.
For example, if my application is accessible through app.com
, the POST request for login an user will be to app.com/api/login
.
But I keep having the 502 Bad Gateway error.
Is this a way to configure my link between the client and the server side that will prevent this error? Did I miss some configurations?
Thank you very much!
I am getting an error when entering my IP address for the initial setup of captainduckduck. Anyone else having this issue or able to help me figure out whats going on please?
It doest accept the IP I enter and drops to the next line with "Enter a valid IP Address"
When trying to login for the first time:
~/Documents/git/PookMook.github.io$ captainduckduck login
module.js:487
throw err;
^
Error: Cannot find module 'assert-plus'
at Function.Module._resolveFilename (module.js:485:15)
at Function.Module._load (module.js:437:25)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/captainduckduck/node_modules/http-signature/lib/parser.js:3:14)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
fixed with npm install -g assert-plus, but this could be a dependency
Can u make wordpress example app, just bc in that case u need to integrate mysql db, and wp-cli? I just wonder how will that will work ( I still didnt try much to play with your app but good work dude)
Think this is the first deploy I've done since updating to the latest version, and it seems to be stuck in a loop where the container will disappear then start repeatedly. Not sure how to stop this short of deleting the app and starting again.
Is it possible to deploy an app on a GitHub commit? (Like heroku )
I tried deploying a Rust hello-world application using captainduckduck and somehow messed up my configuration.
The commandline client responded with
{
"status": 1109,
"description": "The command '/bin/sh -c cargo build --release' returned a non-zero code: 101"
}
It would be nice if the client would also print the output, the command generated. That would make debugging way easier.
Yesterday I did the whole installation process correctly on a DO machine, as recommended. I was able to do my first deploy in a PHP application, it was working normal, until I did refactory code, but then I turned the machine off so I did not continue counting the credits. And 11 hours later on call I waited about 10 minutes and tried to deploy again, and gave this error:
Pushing last commit on master: 47c9cf7e26f597d66bc65951fcbc5f0016a3a5a1
Uploading file to https://captain.manager.domain.com
This might take several minutes. PLEASE BE PATIENT...
Something bad happened. Cannot deploy "tradicao"
{
"status": 1106,
"description": "Auth token is not valid anymore. Request for a new auth token"
}
Hi, great project, what do you think about the possibility to manage cron?
For example, on master, something like app manager, where we can define the instances/server, the schedule and upload a script. The processes' balance could be a simple round robin, or something based on instance load. The master instance run the cron based on schedule and execute the process on the right instance.
It would be great to have Procfile
support like Heroku does.
e.g. Implementation sample >>> https://github.com/ddollar/foreman
Hi !
I really like CDD and want to know if I can do something to help you ?
Here are my skills:
Thanks for your work !
Etienne.
Hello,
first of all I am really impressed by this project and found it really helpful. I have tested some cases and after a while, I want to remove captainduckduck from my local machine. How can it be obtained? I am really noobish with docker.
I tried:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
But captainduckduck keeps restarting and I got ngix and captain entries at docker ps
It would be great if we can provide custom SSL Certificate from other provider such as Comodo rather than the default Let's Encrypt cert.
Can I contribute with this?
Was thinking that it would be better to break up the tutorial into multiple pages using the project's wiki to make it easier to jump to specific sections and also keep the steps in each section focused on the tasks at hand.
@githubsaturn thoughts?
Hi, currently when you connect an app to a new domain, the new domain need to be set up to have the same IP as the captain domain. Would it be possible to add a feature to forego this check in case you want to use a reverse proxy such as Cloudflare please? Thanks
Hello, just come across CDD and it looks like it will meet my needs. The only thing I'm unsure on is if it's possible to deploy a mongo replica set. I can't see a obvious way of doing it, but I've only fired up 1 server so not sure if it becomes a option on a cluster.
I been looking into how to connect to a mongodb that's in a container from my desktop and as far as I can tell you need to ssh and then use the container ip, however I noticed the container doesn't have an ip making this not possible. Is there any way around this that you know of?
Run captainduckduck with normal user and cannot connect to <ip_server>:3000.
Env:
Ubuntu 16.04 (64)
docker: 17.09-ce
Could it be possible to implement an auto deploy on captain when Jenkins merges a pull request on the master branch with webhooks for example ?
Hi there,
I love the idea, but can I test using only one machine using /etc/hosts for resolving the dns?
I tried but I can't change the Captain Root Domain it says: Verification Failed.
And tried captainduckduck serversetup
and the response is:
Error: 1107
Error: Verification Failed.
I have tried running docker run -v /var/run/docker.sock:/var/run/docker.sock dockersaturn/captainduckduck
but the server won't start on my 3000 port.
Running the command below gives me following output.
PS C:\Users\username> docker service ps i8qfbw7rjq46
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR
PORTS
w83sl43x23qfjhl8pxzze11d4 captain-captain.1 dockersaturn/captainduckduck:0.2.2 moby Ready Preparing 1 second ago
zp6uxsz00xur9f4ddfeq91118 \_ captain-captain.1 dockersaturn/captainduckduck:0.2.2 moby Shutdown Rejected 2 minutes ago "invalid mount config for type "bind"
: bind source path does not exist"
zke75cigrkhkayyvh7u6j67vm \_ captain-captain.1 dockersaturn/captainduckduck:0.2.2 moby Shutdown Rejected 3 minutes ago "invalid mount config for type "bind"
: bind source path does not exist"
zbc07larkp9u6gcv65imkvcq6 \_ captain-captain.1 dockersaturn/captainduckduck:0.2.2 moby Shutdown Rejected 6 minutes ago "invalid mount config for type "bind"
: bind source path does not exist"
znjxrb5bwac6xo4f5eaxh6fl6 \_ captain-captain.1 dockersaturn/captainduckduck:0.2.2 moby Shutdown Rejected 15 minutes ago "invalid mount config for type "bind"
: bind source path does not exist"
if you need any more information please let me know.
Is CaptainDuckDuck production ready? If not is there a plan to reach this state?
I'm trying the captainduckduck serversetup
but I hit this response every time:
Error: 1000
Error: SSL is enabled for root. Too late to change your mind!
Also, if you enable force SSL, then you can't even get past the IP entry as the system tries to redirect http://IP:3000 to https://IP:3000 and fails.
I've noticed that you can use internal urls between apps i.e http://srv-captain--myapp-api
which I assume should be a bit quicker than using external urls. However is doesn't work with https. Is that even possible to achieve?
Hi,
do you plan to support Raspberry PI ARMs?
I am trying to setup the phpmyadmin one click app and its just hanging up forever.
main.min.js:2 ReferenceError: PMA_ARBITRARY is not defined
at Object.step1next.process (phpmyadmin.js:66)
at p.OneClickAppsCtrl.$scope.onOneClickAppNextStepClicked (dashboard.min.js:1425)
at fn (eval at compile (main.min.js:4), <anonymous>:4:275)
at e (main.min.js:2)
at i (main.min.js:5)
at p.$eval (main.min.js:3)
at p.$apply (main.min.js:3)
at HTMLButtonElement.<anonymous> (main.min.js:5)
at Nt (main.min.js:1)
at HTMLButtonElement.n (main.min.js:1)
is the error I am getting in dev tools.
Issues installing locally even after following the dnsq steps
Captain Starting ...
Installing Captain Service ...
December 18th 2017, 11:51:11.295 pm Starting swarm at 34.232.18.13:2377
Installation failed.
{ Error: (HTTP code 400) bad parameter - must specify a listening address because the address to advertise is not recognized as a system address, and a system's IP address to use could not be uniquely identified
at /usr/src/app/node_modules/docker-modem/lib/modem.js:254:17
at getCause (/usr/src/app/node_modules/docker-modem/lib/modem.js:284:7)
at Modem.buildPayload (/usr/src/app/node_modules/docker-modem/lib/modem.js:253:5)
at IncomingMessage.<anonymous> (/usr/src/app/node_modules/docker-modem/lib/modem.js:229:14)
at emitNone (events.js:110:20)
at IncomingMessage.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1057:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
reason: 'bad parameter',
statusCode: 400,
json:
{ message: 'must specify a listening address because the address to advertise is not recognized as a system address, and a system\'s IP address to use could not be uniquely identified' } }
Output of nslookup a.captain.x
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: a.captain.x
Address: 127.0.0.1
After my app has uploaded the build is failing with the following error
{
"status": 1109,
"description": "The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1"
}
At first I thought it was possibly a memory issue or cpu as the monitoring showed 100% cpu usage. However I've tried a server with 2 cpus and 4GB memory and it still happens. There's a bit more info in the server logs but not sure what else it can be as the same app deploys ok to my current server which is running flynn.
st | December 12th 2017, 11:51:35.632 am Error: Wrapped: The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1
captain-captain.1.3oewb2lym48v@duck-test | Error: Wrapped: The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1
captain-captain.1.3oewb2lym48v@duck-test | at errorize (/usr/src/app/src/utils/Logger.js:10:16)
captain-captain.1.3oewb2lym48v@duck-test | at Object.e (/usr/src/app/src/utils/Logger.js:45:19)
captain-captain.1.3oewb2lym48v@duck-test | at IncomingMessage.<anonymous> (/usr/src/app/src/docker/DockerApi.js:207:36)
captain-captain.1.3oewb2lym48v@duck-test | at emitOne (events.js:115:13)
captain-captain.1.3oewb2lym48v@duck-test | at IncomingMessage.emit (events.js:210:7)
captain-captain.1.3oewb2lym48v@duck-test | at addChunk (_stream_readable.js:264:12)
captain-captain.1.3oewb2lym48v@duck-test | at readableAddChunk (_stream_readable.js:247:13)
captain-captain.1.3oewb2lym48v@duck-test | at IncomingMessage.Readable.push (_stream_readable.js:209:10)
captain-captain.1.3oewb2lym48v@duck-test | at HTTPParser.parserOnBody (_http_common.js:140:22)
captain-captain.1.3oewb2lym48v@duck-test | at Socket.socketOnData (_http_client.js:438:20)
captain-captain.1.3oewb2lym48v@duck-test | December 12th 2017, 11:51:35.633 am Error: Wrapped: {"code":1,"message":"The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1"}
captain-captain.1.3oewb2lym48v@duck-test | Error: Wrapped: {"code":1,"message":"The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1"}
captain-captain.1.3oewb2lym48v@duck-test | at errorize (/usr/src/app/src/utils/Logger.js:10:16)
captain-captain.1.3oewb2lym48v@duck-test | at Object.e (/usr/src/app/src/utils/Logger.js:45:19)
captain-captain.1.3oewb2lym48v@duck-test | at IncomingMessage.<anonymous> (/usr/src/app/src/docker/DockerApi.js:208:36)
captain-captain.1.3oewb2lym48v@duck-test | at emitOne (events.js:115:13)
captain-captain.1.3oewb2lym48v@duck-test | at IncomingMessage.emit (events.js:210:7)
captain-captain.1.3oewb2lym48v@duck-test | at addChunk (_stream_readable.js:264:12)
captain-captain.1.3oewb2lym48v@duck-test | at readableAddChunk (_stream_readable.js:247:13)
captain-captain.1.3oewb2lym48v@duck-test | at IncomingMessage.Readable.push (_stream_readable.js:209:10)
captain-captain.1.3oewb2lym48v@duck-test | at HTTPParser.parserOnBody (_http_common.js:140:22)
captain-captain.1.3oewb2lym48v@duck-test | at Socket.socketOnData (_http_client.js:438:20)
captain-captain.1.3oewb2lym48v@duck-test | December 12th 2017, 11:51:35.642 am Error: The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1
captain-captain.1.3oewb2lym48v@duck-test | Error: The command '/bin/sh -c npm install && npm cache clean --force' returned a non-zero code: 1
captain-captain.1.3oewb2lym48v@duck-test | at Object.createError (/usr/src/app/src/api/ApiStatusCodes.js:5:21)
captain-captain.1.3oewb2lym48v@duck-test | at /usr/src/app/src/user/ServiceManager.js:270:46
captain-captain.1.3oewb2lym48v@duck-test | at <anonymous>
captain-captain.1.3oewb2lym48v@duck-test | at process._tickCallback (internal/process/next_tick.js:188:7)
I tried find more information about captain-definition file I can't find in this repository. Can you add to this repository?
This should bring up the server selector, similar to deploy
command. Then it should bring up app selector, then it should SSH into server and pipe docker service logs srv-captain--some-app-name
into console.
Allow user to select SSH key path, if the regular path is not found.
When I deploy I've suddenly started getting this error
/usr/local/lib/node_modules/captainduckduck/captainduckduck-deploy.js:243
spinner.stop();
^
TypeError: Cannot read property 'stop' of undefined
at Request.callback [as _callback] (/usr/local/lib/node_modules/captainduckduck/captainduckduck-deploy.js:243:17)
at Request.self.callback (/usr/local/lib/node_modules/captainduckduck/node_modules/request/request.js:186:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/usr/local/lib/node_modules/captainduckduck/node_modules/request/request.js:1163:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/captainduckduck/node_modules/request/request.js:1085:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
Is it possible to have http/2 support?
As far as I can tell nginx just needs it adding to the config such as
listen 443 ssl http2
although I might wrong and it might not be that simple.
My website deploy in PHP, has returned this to me, searched the internet, and talk about the lack of the mysqli extension.
Does anyone know how to install or enable mysqli in the container?
Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/html/system/library/db/mysqli.php:7 Stack trace: #0 /var/www/html/system/library/db.php(9): DB\MySQLi->
Hi, I am attempting to deploy the following captain-definition file:
{
"schemaVersion" :1 ,
"dockerfileLines" :[
"FROM node:8.9.2-alpine",
"RUN mkdir -p /usr/src/app",
"WORKDIR /usr/src/app",
"COPY ./dist /usr/src/app/",
"ENV NODE_ENV production",
"ENV PORT 80",
"RUN npm install http-server -g",
"EXPOSE 80",
"CMD [\"http-server\", \"-a\", \"0.0.0.0\", \"-p\", \"80\"]"
]
}
The docker file builds fine by itself and is a working container. However, when I am attempting to do a captainduckduck deploy, I am getting error status code 502 with the following body:
<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n<hr><center>nginx/1.13.7</center>\r\n</body>\r\n</html>\r\n
I am using a private git repository if that affects anything.
Thanks
Can I configure and run a custom Docker Compose file with C.D.D (Captain Duck Duck)? I need that to build most of my applications but I don't like the complexity of the others tools like Kubernetes.
Hello, I'm currently on v.30 and I keep getting the same deploy error every time. This is my first deployed app and I've set up the server according to the docs. The error detailed here was was uploading the test node app (no modifications) and deploying from my local machine (username and domain have been redacted).
I'm currently using a iMac on High Sierra.
I haven't ever deployed an app yet, so I can't tell if this is a bug or maybe something I'm missing.
Deploying to do-captain
Saving zip file to:
/Users/**username**/Downloads/node/temporary-captain-to-deploy.zip
Pushing last commit on master: 82246e41849bc1914510eba7a7d2ac57530ee0e5
Uploading file to https://captain.app.**domain**.com
This might take several minutes. PLEASE BE PATIENT...
Something bad happened. Cannot deploy "node-test"
{
"statusCode": 500,
"body": "Internal Server Error",
"headers": {
"server": "nginx/1.13.7",
"date": "Tue, 19 Dec 2017 23:14:24 GMT",
"content-type": "text/plain; charset=utf-8",
"content-length": "21",
"connection": "close",
"x-powered-by": "Express",
"etag": "W/\"15-/6VXivhc2MKdLfIkLcUE47K6aH0\""
},
"request": {
"uri": {
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "captain.app.**domain**.com",
"port": 443,
"hostname": "captain.app.**domain**.com",
"hash": null,
"search": null,
"query": null,
"pathname": "/api/v1/user/appData/node-test",
"path": "/api/v1/user/appData/node-test",
"href": "https://captain.app.**domain**.com/api/v1/user/appData/node-test"
},
"method": "POST",
"headers": {
"x-namespace": "captain",
"x-captain-auth": "**********************REMOVED****************",
"content-type": "multipart/form-data; boundary=--------------------------884217313532410945046176",
"content-length": 51586
}
}
}
Hi, great project!
I wonder if there is a way to enforce HTTPS on apps created by captainDuckDuck.
I can enable HTTPS, and redirect it using .htaccess for instance, but a proper enforce at the NGinx gateway would be better!
Thanks!
Removed
It may be worthwhile recommending a minimum machine size on digital ocean. I tried running a basic hello-world node app on the $5/mo box and received cryptic error messages when trying to run the npm install && npm cache clean --force
step. Apparently it was due to the machine running out of memory as seen here. I increased the size of the droplet to the $10/month and deploy seems to work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.