Closed mateomorrison closed 7 years ago
@aaronjudd Any heads up?
Going to need more info than that to make any recommendations. What do your logs show?
Also, the container exposes port 3000, so that config needs to be -p 80:3000
@jshimko Where to find logs? Remember I'm hosting on DO, obviously as a VM through my computer when I docker-machine create
.
So I basically successfully created the machine, then can't run the reaction script. Because like I said, when trying to docker run
it just do nothing
I'm just following your docs but it doesn't work. Any other way to rapidly deploy my app into DO droplet?
docker logs -f <container ID>
How to get log from the container when it's not even running? That's what I meant. When trying docker run
not matter what port, url or anything. It does nothing that I have to cancel with Ctrl + C. And try docker ps -a
again and it's empty.
Something I'm doing wrong? @jshimko
Thinking backwards, instead of running the full code, I try with docker run reactioncommerce/reaction
and it seemed like it was starting (?). But then I signed in in other tab and ran docker ps -a
and it showed empty again, like nothing happened never.
The -p
flag is not optional. You need to route traffic to port 3000 on the container.
These are the minimum options required to run a container:
docker run -p 80:3000 -d reactioncommerce/reaction:latest
Just used docker run -p 80:3000 -d reactioncommerce/reaction:latest
and it already appears on docker ps -a
. When running log this is the output:
-] External MONGO_URL not found. Starting local MongoDB...
[-] External MONGO_URL not found. Starting local MongoDB...
=> Starting app on port 3000...
18:04:07.566Z INFO Reaction: Load default data from /private/data/
18:04:08.295Z WARN Reaction: Skipped loading settings from reaction.json.
18:04:08.298Z INFO Reaction: JobServer started
18:04:19.093Z WARN Reaction: Reaction.Email.getMailUrl() - no email provider configured
18:04:19.115Z WARN Reaction:
***************************************************
IMPORTANT! EMAIL VERIFICATION LINK
Email sending is not configured.
Go to the following URL to verify email: kfehmsyf@localhost
http://localhost/#/verify-email/e2U1DSUTh85SgKct4Z66kvMiBFELikD7l7CPvYr__L6
***************************************************
/opt/reaction/dist/bundle/programs/server/node_modules/fibers/future.js:313
throw(ex);
^
MongoError: connection 2 to 127.0.0.1:27017 closed
at Object.Future.wait (/opt/reaction/dist/bundle/programs/server/node_modules/fibers/future.js:449:15)
at [object Object]._.extend._nextObject (packages/mongo/mongo_driver.js:1024:47)
at [object Object]._.extend.forEach (packages/mongo/mongo_driver.js:1058:22)
at [object Object]._.extend.map (packages/mongo/mongo_driver.js:1068:10)
at [object Object]._.extend.fetch (packages/mongo/mongo_driver.js:1092:17)
at [object Object].Cursor.(anonymous function) [as fetch] (packages/mongo/mongo_driver.js:907:44)
at Object._.extend._updateUserRoles (packages/alanning_roles.js:718:52)
at Object._.extend.setUserRoles (packages/alanning_roles.js:250:11)
at Object.module.export.exports.default.createDefaultAdminUser (server/api/core/core.js:312:11)
at Object.module.export.exports.default.init (server/api/core/core.js:32:10)
at module.export.exports.default (server/startup/init.js:8:12)
at module.export.exports.default (server/startup/index.js:18:3)
at server/main.js:6:3
at Function.time (/opt/reaction/dist/bundle/programs/server/profile.js:301:28)
at /opt/reaction/dist/bundle/programs/server/boot.js:304:13
at /opt/reaction/dist/bundle/programs/server/boot.js:345:5
at Function.run (/opt/reaction/dist/bundle/programs/server/profile.js:480:12)
at /opt/reaction/dist/bundle/programs/server/boot.js:343:11
- - - - -
at Function.MongoError.create (/opt/reaction/dist/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:29:11)
at Socket.<anonymous> (/opt/reaction/dist/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:198:22)
at Socket.g (events.js:260:16)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at TCP._onclose (net.js:487:12)
Are we close?
I don't know what that Mongo error is. I've never seen it before. And I don't get that error when I run the same command. I'd try starting over one more time.
@jshimko I will follow exactly what you did in here
But:
Shows a 503 Error on nginx
Still docker run
do nothing.
I'm not sure what else to suggest. Running the latest build consistently works fine for me. I'm also not sure what you mean by "docker run
does nothing". What is it that you're expecting to see that isn't happening? The only thing you should see is the image download and start. You have to specifically run the docker logs
command to get any additional output once it's running.
Also, did you see the comments under that gist that addresses the header size issue when using nginx? If you want to use jwilder/nginx-proxy
with Reaction, you're definitely going to need to make those changes to the nginx config.
I'd start by getting Reaction working without nginx first though so you can solve one problem at a time.
docker run
actually does nothing. When running it doesn't charge, or load. Just hangs in there. Let's forget about jwilder/nginx-proxy
. Maybe if I run the code this way:
docker run -d -p 80:80 -e ROOT_URL="URL" reactioncommerce/reaction:latest
Maybe it works? Meaning no tabs, no spaces. I will hack the way around and tell you in a bit.
Again, I just want to point out that it's 80:3000
, not 80:80
. If you don't route traffic from the external host port to the correct container port, it is guaranteed not to work.
So, I can't reproduce any of your reported issues. I'm fairly certain this is an implementation problem and not an issue with Reaction code, so I'm going to close this issue. If you are able to identify a problem with Reaction or provide reproduction steps that reliably fail, please feel free to reopen it and post your details.
In my case, @mateomorrison i used first docker container list
, then it showed in COMMAND column that /bash/cat
was running. So I added at the end of my Dockerfile CMD /bash/sh
and next time it worked. Maybe your COMMAND is different, but hope it gives you a hint.
For future cases: Remember to open/close two double quotes, that's why some people run the command and don't return the result and with each enter their console will look like this
docker run --something="... (forget to close)
CTRL + C
I'm using Digital Ocean with Docker to install Reaction. After successfully running and creating the
docker-machine create
, signing in withdocker-machine env reaction-host
and telling my machineeval "$(docker-machine env reaction-host
. I try to actually start the Reaction by typing:(I'm hiding credentials, but I'm replacing URL, MAIL, USER, PASSWORD with correct one)
It just do nothing... Really.
How to get it fixed?