Skip to content
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

local docker deploy issue #676

Closed
mhkeller opened this issue Sep 3, 2015 · 27 comments
Closed

local docker deploy issue #676

mhkeller opened this issue Sep 3, 2015 · 27 comments

Comments

@mhkeller
Copy link

mhkeller commented Sep 3, 2015

I'm using OS X 10.10.4

I cloned the repository and ran

$ docker-compose up

and got this

rocketchat_1 | Updating login service Accounts_OAuth_Facebook
rocketchat_1 | Updating login service Accounts_OAuth_Github
rocketchat_1 | Updating login service Accounts_OAuth_Gitlab
rocketchat_1 | Updating login service Accounts_OAuth_Google
rocketchat_1 | Updating login service Accounts_OAuth_Linkedin
rocketchat_1 | Updating login service Accounts_OAuth_Meteor
rocketchat_1 | Updating login service Accounts_OAuth_Twitter
rocketchat_1 | Updating login service SAML_Custom_default
rocketchat_1 | {"line":"63","file":"synced-cron-server.js","message":"SyncedCron: Starting \"Generate and save statistics\".","time":{"$date":1441296000010},"level":"info"}
mongodb_1    | 2015-09-03T16:00:00.029+0000 I COMMAND  [conn2] CMD: drop rocketchat.tmp.mr.rocketchat_room_0
mongodb_1    | 2015-09-03T16:00:00.030+0000 I COMMAND  [conn2] CMD: drop rocketchat.rocketchat_mr_statistics
mongodb_1    | 2015-09-03T16:00:00.030+0000 I COMMAND  [conn2] CMD: drop rocketchat.tmp.mr.rocketchat_room_0
mongodb_1    | 2015-09-03T16:00:00.031+0000 I COMMAND  [conn2] CMD: drop rocketchat.tmp.mr.rocketchat_room_0
mongodb_1    | 2015-09-03T16:00:00.031+0000 I COMMAND  [conn2] CMD: drop rocketchat.tmp.mr.rocketchat_room_0
rocketchat_1 | private group user statistic not found
rocketchat_1 | Sending statistics data to Rocket.Chat
rocketchat_1 | {"line":"63","file":"synced-cron-server.js","message":"SyncedCron: Finished \"Generate and save statistics\".","time":{"$date":1441296000182},"level":"info"}

This is my first time with docker so I'm not exactly sure of the steps. I also ran docker pull rocketchat/rocket.chat which downloaded the image but not sure if that had any effect on this process.

When I go to localhost:80 I get nothing.

@k0nsl
Copy link
Contributor

k0nsl commented Sep 3, 2015

@mhkeller:

Unsure, but shouldn't it be on port 3000?

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

That's my understanding for the development instructions but for production the docs say

and check it out at http://localhost:80

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

3000 doesn't work either, however.

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

on OSX - docker is running inside a VM -- called boot2docker

docker runs native only on Linux and variants

the general instructions are for docker on Linux

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

you need to boot2docker ip to find the IP address of the VM

it will not be localhost on the Mac

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

@k0nsl thanks for helping 😄 @mhkeller please let us know if you got it working and/or close this ticket. thx

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

Ah that makes sense. I'll be back at my computer to test this afternoon and will report back. Another question tho: after running docker-compose up I get the server running in a window in that container. How would I get it running as a service?

Le Sep 3, 2015 à 13:20, SingLi notifications@github.com a écrit :

@k0nsl thanks for helping @mhkeller please let us know if you got it working and/or close this ticket. thx


Reply to this email directly or view it on GitHub.

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

@mhkeller On your Mac, Rocket.Chat on docker is running insider a Linux Virtual Machine (ORACLE VirtualBox, I think) - that is the window that you see. There's no real way of running a VM as a 'service' on the Mac.

If you want to run it 'native' as a service on your Mac. You do not want docker (and the extra VM). You will need to install node.js on your Mac first.

We currently do not have instructions for doing this ... but after you got node.js installed, go to the demo chat from our home page, and one of the team members will likely be able to assist you.

@marceloschmidt
Copy link
Member

@Sing-Li and @mhkeller boot2docker is deprecated. I'll try to run docker on my mac following the new instructions on https://docs.docker.com/installation/mac/ and I'll let you guys know how that goes and probably write a new wiki for using docker to run rocket.chat on a mac.

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

@marceloschmidt I was just about to post. You can use docker-machine ip default where default is the name of my running docker vm.

now im trying to figure out port forwarding so i can get access rocket chat on other computers than this one. should I open a new issue @Sing-Li

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

@mhkeller so you've got it going on your mac? I think @marceloschmidt 's guide will contain the port forwarding info. So just closing this ticket is fine. Thanks for the issue - it helped us to realize we have a hole in the documentation.

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

@marceloschmidt - that would be a great user's guide ! Thanks.

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

Ya I have it running, thanks for the help. I definitely have questions that the guide could address:

  1. I'm rather confused about where I have to login from to get access to the docker daemon. If i cd to where I cloned Rocket.Chat and run docker-compose up it tells me the daemon is not running. I have to open the "Docker Quickstart Terminal" app, which seems to log into the default VM but when I run pwd I'm still in my system. It's a bit confusing.
  2. Where does docker pull rocketchat/rocket.chat come into play? Is it an alternative to git cloning the repository? If I wanted to run docker-compose up on that image, how would I do it?

@marceloschmidt thanks for putting the guide together!

@mhkeller mhkeller closed this as completed Sep 3, 2015
@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

Also worth noting that when you log into the quick start terminal, it prints the IP of the machine.

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

many of the walkthroughs on port fowarding describe this

VBoxManage controlvm "default" natpf1 "tcp-port80,tcp,,80,,80";

but that doesn't work for me. if there's an alternate way you're finding that would be great. Edited to show the actual ports I'm using

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

a question is ... are you running this on a macbook? It is not a typical configuration to use a laptop for a server due to power-save, etc.

@Sing-Li
Copy link
Member

Sing-Li commented Sep 3, 2015

@marceloschmidt hopefully you will cover running docker-compose - with mongo in a separate container. Thanks.

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

it's a desktop mac.

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

quick q. @marceloschmidt is this something you're currently working on or is longer term? I was going to try and give people a demo this week. I can run it in development mode but it would be great if I could stand it up to see how it's used by the weekend crew.

@marceloschmidt
Copy link
Member

I'm currently working on it, but I have close-to-zero knowledge on docker. Picking up things as I go. I'm trying to move as quickly as I can, but honestly I don't think I'll be able to give you very detailed information in just a couple of days.

@mhkeller
Copy link
Author

mhkeller commented Sep 3, 2015

Got it. So we're in the same boat then! I'll do some research and if I come across anything that looks useful ill paste it here.

Thanks for the help!

Le Sep 3, 2015 à 18:11, Marcelo Schmidt notifications@github.com a écrit :

I'm currently working on it, but I have close-to-zero knowledge on docker. Picking up things as I go. I'm trying to move as quickly as I can, but honestly I don't think I'll be able to give you very detailed information in just a couple of days.


Reply to this email directly or view it on GitHub.

@marceloschmidt
Copy link
Member

You can setup port forwarding in your VirtualBox application.

image

In my case, my lan ip was 192.168.25.45 and I assigned port 8080 to port 80 on docker. So other on my LAN could access http://192.168.25.45:8080 and see my docker instance running

@marceloschmidt
Copy link
Member

BTW, you can add that port forwarding by running $ VBoxManage controlvm "default" natpf1 "tcp-port80,tcp,192.168.25.45,8080,,80"

of course, change your ip and local port as desired.

@mhkeller
Copy link
Author

mhkeller commented Sep 4, 2015

Interesting so that works with port 8080 but not port 80 so perhaps it's a permissions issue. It also works for me without setting the Host IP to the LAN IP as long as I set it to 8080. This is great for now though! Thanks!

@mhkeller
Copy link
Author

mhkeller commented Sep 4, 2015

Adding what you need to change in docker-compose.yaml would also be great re: #686

@mhkeller
Copy link
Author

mhkeller commented Oct 2, 2015

@marceloschmidt did you end up publishing that guide somewhere?

@marceloschmidt
Copy link
Member

Nope, never did :( but yesterday I was giving docker another shot and I think I'll do it today again. If all goes as I expect, I'll create a wiki on setting it up. Thanks for the reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants