rethinkdb / horizon

Horizon is a realtime, open-source backend for JavaScript apps.
MIT License
6.78k stars 349 forks source link

Using "rethinkdb" as an alias for the hz serve CLI connect options would failed #881

Open rguillome opened 7 years ago

rguillome commented 7 years ago

Server version: 2.0.0

I tried to run a dev environment from the current docker-compose.yml and get the following error when the horizon server started :

error: Connection to RethinkDB terminated: ReqlDriverError: Could not connect to 28015:28015.
connect EINVAL 0.0.109.111:28015 - Local (0.0.0.0:0)

After several tests, i figure it out and It seems that the CLI hz replace the word rethinkdb by and empty String when using it with the --connect option.

I fixed it by replacing the alias of the rethinkdb container : rethinkdb by rethindbtest . The current working docker-compose.yml

  rethinkdbtest:
    image: rethinkdb
    ports:
      - "28015:28015"
      - "8080:8080"
  horizon:
    image: rethinkdb/horizon
    command: su -s /bin/sh horizon -c "hz serve --dev --connect rethinkdbtest:28015 --bind all /usr/app"
    volumes:
      - /home/rguillome/Documents/perso/study/horizon/cv-backend:/usr/app
    links:
      - rethinkdbtest
    ports:
      - "8181:8181"