DavidBoike / feedback

Ask me anything!
0 stars 0 forks source link

RavenDB cluster - docker #6

Closed njunior1980 closed 3 years ago

njunior1980 commented 3 years ago

Hi, congrats by article. I tried but hadn't success. My cluster is created, but I can't to connect by Ravendb client. Can you help me? Thanks David.

"hostos:172.24.83.193" is my public ip (my computer/router).

https://www.davidboike.dev/2019/06/creating-a-ravendb-cluster-in-docker/

version: '3'
services:
  raven1:
    container_name: raven1
    image: ravendb/ravendb:5.1.6-ubuntu.20.04-x64
    ports:
      - 8080:8080
      - 38888:38888
    extra_hosts:
      - "hostos:172.24.83.193"
    environment:
      - RAVEN_Security_UnsecuredAccessAllowed=PublicNetwork
      - RAVEN_Setup_Mode=None
      - RAVEN_License_Eula_Accepted=true
      - "RAVEN_ServerUrl=http://0.0.0.0:8080"
      - "RAVEN_PublicServerUrl=http://hostos:8080"
      - "RAVEN_ServerUrl_Tcp=tcp://0.0.0.0:38888"
      - "RAVEN_PublicServerUrl_Tcp=tcp://hostos:38888"

image

image

DavidBoike commented 3 years ago

I don't remember the details about this now, but pretty sure that extra_hosts bit is only because I'm running Docker on my Mac, and trying to use it from my Windows VM. hostos is something defined in my Windows hosts file as pointing to the virtual IP that Parallels sets up for Windows, and I think the point was so that when I went to http://hostos:8080 from Windows, the Docker container would recognize that as a request it should listen to. I'm pretty sure that having it set to the public IP of your router (completely outside your computer) isn't going to be helpful. If you're running this all on Windows, you should be trying to connect directly to localhost:8080.

njunior1980 commented 3 years ago

Ok David, I'll see what's going on. Thanks again.