Last active
June 29, 2020 15:27
-
-
Save dalanmiller/d925a6b5311bdbeff5fafa1ba4a08652 to your computer and use it in GitHub Desktop.
RethinkDB docker-compose.yml example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGE node:argon | |
RUN mkdir -p /usr/app | |
COPY . /usr/app | |
WORKDIR /usr/app | |
RUN npm install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IMAGE rethinkdb | |
COPY ./data.json /usr/data.json | |
RUN rethinkdb import -f /usr/data.json --table data.table --format json && rm /usr/data.json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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'