docker-compose up
docker
but rather docker-compose
alongside it that gives a quick way
to bring servers up and get going.http://localhost:3000/explorer
and play around.mongo shell
or RoboMongo
or MongoChef
or any client you best see fit .. to connect to mongodb://localhost:3001/loopback-mongo-sandbox
from your host machine.3000
but mongo is published to a non-default port 3001
?
mongodb://mongo:27017/loopback-mongo-sandbox
which leverages the mapping created by docker-compose
for the mongo
service.mongodb://localhost:27017/loopback-mongo-sandbox
would also start working as a valid URL within datasources.json
and users wouldn't notice a difference. I wanted to discourage that and bring attention to the benefits of referencing a service by name. You won't live on localhost forever, as your code will reach the world one day!Choose one:
Deploy Locally
cd ~/dev
git clone https://github.com/ShoppinPal/loopback-mongo-sandbox.git
cd ~/dev/loopback-mongo-sandbox
docker-compose run builder npm install
docker-compose up