Giter Site home page Giter Site logo

bind to different interface about run-rs HOT 11 CLOSED

vkarpov15 avatar vkarpov15 commented on July 2, 2024
bind to different interface

from run-rs.

Comments (11)

chaiwa-berian avatar chaiwa-berian commented on July 2, 2024

@Christilut if you are on Windows it should be able to bind to whatever the hostname of your machine is. On linux/mac it should bind to localhost or 127.0.0.1!

Note: If on Windows, recommended to use version 0.3.2 or higher!

What is your development environment like?

from run-rs.

chaiwa-berian avatar chaiwa-berian commented on July 2, 2024

@Christilut did you mean if run-rs supports running it with a --host option so it can be bound to any host where the replica set is running?

from run-rs.

Christilut avatar Christilut commented on July 2, 2024

I'm on Linux (ubuntu 16.04). Yea I mean a host option. In the normal MongoDB installation I would have to use bindIp and set it to my local network interface.

I'm using it on a Lightsail VPS and localhost isn't exposed to the outside network there and I have to bind mongo to the private network IP address that AWS gives me.

from run-rs.

chaiwa-berian avatar chaiwa-berian commented on July 2, 2024

I'm on Linux (ubuntu 16.04). Yea I mean a host option. In the normal MongoDB installation I would have to use bindIp and set it to my local network interface.

I'm using it on a Lightsail VPS and localhost isn't exposed to the outside network there and I have to bind mongo to the private network IP address that AWS gives me.

Ok that sounds fair! Looking at the current codebase, the --host is not supported but I will make a pull request for it shortly so we can check it out!

from run-rs.

Christilut avatar Christilut commented on July 2, 2024

Awesome!

from run-rs.

chaiwa-berian avatar chaiwa-berian commented on July 2, 2024

@Christilut See this pull request #18

from run-rs.

Christilut avatar Christilut commented on July 2, 2024

Thanks, works perfectly.

I am wondering now how to enable authentication for run-rs, I think that's also not yet implemented? Maybe a simple flag --enableAuthentication that would change the mongo config to:

security:
    authorization: "enabled"

I'm running a development server, so it's not a huge deal.
Maybe it makes sense to parse a config file similar to mongod.conf with all the settings?

from run-rs.

chaiwa-berian avatar chaiwa-berian commented on July 2, 2024

@Christilut Good to know it works! We wait @vkarpov15 's approval to merge the pull request

from run-rs.

chaiwa-berian avatar chaiwa-berian commented on July 2, 2024

Thanks, works perfectly.

I am wondering now how to enable authentication for run-rs, I think that's also not yet implemented? Maybe a simple flag --enableAuthentication that would change the mongo config to:

security:
    authorization: "enabled"

I'm running a development server, so it's not a huge deal.
Maybe it makes sense to parse a config file similar to mongod.conf with all the settings?

Great idea, kindly open a new issue for that! :)

from run-rs.

vkarpov15 avatar vkarpov15 commented on July 2, 2024

Auth is something we will consider for the future but it isn't a big concern. Run-rs should only be used for local dev, so auth isn't a major concern

from run-rs.

Christilut avatar Christilut commented on July 2, 2024

Totally agree. I'm using run-rs now on a VPS because Atlas has a bug where the free tier can't support transactions. I guess I'll do some ip whitelisting for now.

from run-rs.

Related Issues (20)

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.