Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple instances & micro services #41

Open
akiarostami opened this issue Jul 5, 2015 · 5 comments
Open

Multiple instances & micro services #41

akiarostami opened this issue Jul 5, 2015 · 5 comments

Comments

@akiarostami
Copy link

Hi,

First of all, thank you for the wonderful job!

My meteor app has two parts, both standard Meteor apps, using the same Mongo database.

Admin app: I run this app on my local (development) machine using the default settings (port 3000, meteor-handled mongo). I have no problem running this using Meteor-helper.

User app: I run this app on a different port (5555) and connect it to the admin app's mongo instance, using the following settings in mup.json file:

{
  "env": {
    "PORT": 5555,
    "MONGO_URL": "mongodb://localhost:3001/meteor"
  }
}

When I try to run the User app, I get a bunch of errors, including "No scheme found in URI undefined".
When this happens, I also get "Unexpected mongo exit code 0. Restarting." on the Admin app.

I know this may look a bit complicated, but it's actually very easy to replicate. It would be great if you could take a look at this problem.

Thank you!

@coopermaruyama
Copy link
Contributor

Are you trying to run these both off of Atom at once? Or is it one atom and another just the regular way from a terminal?

@akiarostami
Copy link
Author

I have two separate projects opened in two different atom windows. I have no issues running it from a terminal, but can't run it from Atom.

@PEM--
Copy link
Owner

PEM-- commented Aug 31, 2015

I'm lagging behind here too. Didn't see the notifications.

This package was designed to launch a single instance of Meteor... But with the rise of micro-services, this case starts to be a mandatory feature.

Currently, the analyzed workspace is the first being launched. The settings overrides the environment variables when Meteor is launched letting it knows about the content of the mup.json. What should be done here, is to parse the content of the mup.json file each time a Meteor process is launched and link the read environment variables to the executed process. I guess that the current Atom's workspace could be extended to set the process on it.

That would to the trick for the moment but that would not tackle the problem of micro-services. I will think about it.

PS: @akiarostami, I got the same issues as yours on OrionJS's CMS. I would like to separate the admin app from the main public app. For the moment, I haven't investigate too much in this topic but surely will.

@PEM-- PEM-- changed the title MONGO_URL Multiple instances & micro services Aug 31, 2015
@PEM--
Copy link
Owner

PEM-- commented Aug 31, 2015

@akiarostami I've modified the title of the issue to bring more meaning 😉

@akiarostami
Copy link
Author

Thank you! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants