Code Monkey home page Code Monkey logo

Comments (3)

gjovanov avatar gjovanov commented on August 16, 2024

Hi @siddharthsrivastava,
Most of the instructions can be found either in the main README or on Medium:

https://medium.com/@gjovanov/building-your-own-slack-54874bf5fd7a

The quick and dirty way to start mongo as a docker service, is by running:
docker run -d --name mongo --restart=always -p 27017:27017 -v mongo_data:/data/db mongo

Notice that this will create without username and password (recommended only for your development environment - NOT FOR PRODUCTION).

Also can start the container with admin account:

docker run --name mongo \
	-e MONGO_INITDB_ROOT_USERNAME=SuperUser \
	-e MONGO_INITDB_ROOT_PASSWORD=SuperSecret \
	-p 1212:27017 \
        -v mongo_data:/data/db

then you can connect to the admin DB via the terminal/bash/CMD:

mongo admin -u SuperUser -p SuperSecret --host localhost --port 27017

once logged in:

use roomlerdb
db.createUser(
  {
    user: "roomler_user",
    pwd: "super_secret",
    roles: [ { role: "readWrite", db: "roomlerdb" } ]
  }
)

Another way to start the whole stack is via dockerc-compose:

https://github.com/gjovanov/roomler/blob/master/docker-compose.yml

docker-compose up

Before doing that, you need to create your .env file with all the environment variables needed in that file... e.g:

MONGO_INITDB_ROOT_USERNAME=YOUR_MONGO_ROOT_USER
TURN_USERNAME=YOUR_TURN_USER
etc...

In case you run the mongo without authentication (no admin account), then you can omit the env variable DB_URL with will default to: mongodb://localhost:27017/roomdb

Otherwise you need to put username and password in the connection string:
DB_CONN=mongodb://roomler_user:super_secret@mongo/roomlerdb

Let me know if you encounter any specific issue.

from roomler.

gjovanov avatar gjovanov commented on August 16, 2024

@siddharthsrivastava any update on this one or we can close it?

from roomler.

siddharthsrivastava avatar siddharthsrivastava commented on August 16, 2024

@siddharthsrivastava any update on this one or we can close it?

Yes, can be closed. Thank you

from roomler.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.