Skip to content

Instantly share code, notes, and snippets.

@dalanmiller
Last active June 29, 2020 15:27
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dalanmiller/d925a6b5311bdbeff5fafa1ba4a08652 to your computer and use it in GitHub Desktop.
Save dalanmiller/d925a6b5311bdbeff5fafa1ba4a08652 to your computer and use it in GitHub Desktop.
RethinkDB docker-compose.yml example
version: '2'
services:
rethinkdb:
build: /rethinkdb
ports:
- "28015"
volumes:
- /data:/data
command: rethinkdb --bind all --data /data
app:
build: /app
volumes:
- /app/folder:/app
command: node start --production
depends_on: rethinkdb
ports:
- 8080:80
IMAGE node:argon
RUN mkdir -p /usr/app
COPY . /usr/app
WORKDIR /usr/app
RUN npm install
IMAGE rethinkdb
COPY ./data.json /usr/data.json
RUN rethinkdb import -f /usr/data.json --table data.table --format json && rm /usr/data.json
@ArmandoBMTH
Copy link

I am trying to access the image of RethinkDB but when trying to connect it shows me an error, the loaded image of RethinkDB is the following:

-docker-compose.yml

rethinkdb:
image: "rethinkdb"



-docker-compose.override.yml

rethinkdb:
image: rethinkdb
ports:
- "28015:8080"
- "28015"

and the connection to RethinkDB from a microservice is the following:

conn = R.Connection() .Hostname("localhost").Port(28015).Timeout(10).Connect();

The error is as follows:
System.Net.Sockets.SocketException: 'Cannot assign requested address'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment