Comments (4)
Thx for your quick help.
I solved it by moving my existing mongodb data from the host machine to a 2nd Docker container as this:
docker-compose.yml
version: "3.3"
services:
mongo:
image: mongo:latest
volumes:
- db_data:/data/db
ports:
- "37017:27017"
restart: always
nosqlclient:
depends_on:
- mongo
image: mongoclient/mongoclient:latest
ports:
- "3010:3000"
restart: always
environment:
MONGO_URL: mongodb://mongo:27017/sd_index
volumes:
db_data:
external: false
from nosqlclient.
Hello @Ekliptor
I believe docker is connecting to network after startup, but MONGO_URL
is being used before startup for nosqlclient's internal storage, so you may use another docker container of mongodb for that part I suppose.
Btw. you don't have to specify MONGO_URL
, nosqlclient will start it's own and connect to it, you can just use the binded volume every time to keep your connections etc.
from nosqlclient.
Thx for the fast reply.
I want to use another Mongo DB database I have on my local machine. So the easiest solution would be to move that to a 2nd Docker container and use Docker compose.
Would be helpful if you provided some more example setup files.
from nosqlclient.
I personally not really good at docker clusters, just using nosqlclient without an orcehstration for myself, on the other hand I know a lot of people using nosqlclient with compose and kubernetes, the problem is I'm not really familiar with those, sorry
from nosqlclient.
Related Issues (20)
- New version release (including docker tags) HOT 5
- node-fibers is missing in 4.0.0 docker image HOT 4
- Docker image - failed to connect to server [127.0.0.1:27017] on first connect HOT 9
- uncaughtException: other.isNegative is not a function HOT 1
- Self signed certificates don't work
- Add global credentials HOT 2
- TTL indexes are created with "expireAfterSeconds" as String not Int HOT 2
- MONGO_URL environment variable not creating connection HOT 2
- How use selector filter return field? HOT 1
- {"externalError":"connection-closed","methodArray":[{"find":[{}]},...,"level":"error","message":"[connection-error]"} HOT 8
- how can i listen :: by set env HOT 8
- Option to turn off transitions HOT 3
- Cant connect to Mongo Cloud DB (Atlas) HOT 2
- Need to wait loading to perform a query on large collections HOT 3
- Heroku deploy error HOT 2
- In case of using a connection url the shell connection fails. HOT 2
- running without docker HOT 1
- SecurIty: Credentials are leaked on the log file HOT 3
- URL in Github Project seems to be wrong HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nosqlclient.