jadjoubran / webdash

🔥 Orchestrate your web project with Webdash the customizable web dashboard
https://webdash.xyz
MIT License
1.55k stars 70 forks source link

Attempting to run in Docker #85

Closed ihinckle closed 5 years ago

ihinckle commented 6 years ago

trying to run in a docker container. taking the exact same steps as i did on the host os. encountering error code 3


isaac@6e5f08a713d3:~/projects/webdash-test$ npx webdash serve --port 3000
Webdash running on http://localhost:3000!
(node:3905) UnhandledPromiseRejectionWarning: Error: Exited with code 3
    at ChildProcess.cp.once.code (/home/isaac/projects/webdash-test/node_modules/opn/index.js:84:13)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:567:12)
(node:3905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3905) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
'''
jadjoubran commented 6 years ago

Thanks @ihinckle I think webdash should be running even though you get this error Have you tried going to http://localhost:3000 ? This is failing because we're trying to open the url in your browser but that's failing under docker Even though I wrapped it with try catch

Let's see with you first if it's working and then I'll figure out how to fix it or suppress the message or even add a --no-open flag

ihinckle commented 6 years ago

unfortunately i get 'localhost didn’t send any data.' when i visit the page.

but if i run webdash on the host os in the exact same folder it will work. id love to look into it myself as well but im just starting my trip down the docker rabbit hole.

jadjoubran commented 6 years ago

ah okay I've never worked with Docker but isn't this about Docker port mapping/forwarding/exposing?

ihinckle commented 6 years ago

ive double checked the setup for the ports. i can for example host an angular app through that port.

jadjoubran commented 6 years ago

so you're sure it's port 3456 right? if not, then are you passing -p 8000 for example?

ihinckle commented 6 years ago

yes, i have verified that all the ports match up and that i am attempting to use webdash through the exposed port. even set up a container with webdash's default port as the exposed port. im thinking that when it breaks it is somehow blocking further processing.

jadjoubran commented 6 years ago

If possible, please try manually commenting out the opn line (and the try catch) in node_modules/webdash/scripts/index.js and see if it works (although I doubt it)

ihinckle commented 6 years ago

you were correct. commenting those out didnt affect it. it seems to be connecting because the error page is saying 'didn't send any data' instead of couldn't be reached.

this instance i set the docker up to use webdash's default port. i can verify the port is being listened to

if anyone else wants to attempt

using docker


docker pull ubuntu
docker run -it -p 3456:3456 ubuntu
apt update
apt install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
follow last instructions from nvm to get it added to path in existing terminal
nvm install 8

create a project folder and enter the folder
follow webdash instructions https://webdash.xyz/
jadjoubran commented 6 years ago

okay and you're definitely running node >= 9 right?

jadjoubran commented 5 years ago

Closing for inactivity, feel free to add more information in case it's still an issue