-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Multiple apps on one server #116
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
Comments
Is connecting each app to a separate mongodb database, a good way to go? |
I'm looking at doing the same thing, thinking will need to create a new database and instance of ParseServer for each app and map this to a different path, maybe something like this
|
So if the client SDK connects to the url |
Sorry, i meant also change the url so you have /app1 /app2 |
Do we have any open source dashboard like project that when used with parse-server can give us a Parse like dashboard? Is someone developing it? I am willing to write one myself. |
Have a look at #3 I'm interested in contributing to a dashboard as well, for most of my apps, I've just written a custom CRUD dashboard in Javascript |
Right now the main hurdle for multi-app support will be cloud code. The middleware which creates Parse.Cloud.define/etc will need to be updated similarly to #139 to somehow support separate cloud code initialization. Right now it's easy enough to run multiple from the database side... I'm going to close this for now but hope to see the server hosting multiple apps and cloud code in the not-too-distant future. |
@gfosco funnily enough I was playing around with the middleware which deals with the Cloud Code functions yesterday (fairly similar to #139). I managed to get the functions loaded up for different apps— but the brick wall in the end was the The other issue is the |
Does anyone has a workaround for multiple apps with different cloud codes? I have been trying to figure out a way to implement. any quick thoughts please? |
Best solution currently is to just create two instances of parse server for now... |
You can run the multi instance all in one index and use nodemon to manage the service when for when you makes changes or add another instance. |
Oddly, I have 100+ apps in my parse.com account. Does this mean these are all separate instances of Parse running? |
No, parse.com was massively multi-tenant. And as a result, massively complicated. You'll still be able to run your 100 apps on one MongoDB, but you will need separate instances of Parse Server. |
If a separate instance, that means I need to mount each parse instance on its own unique port right? Does Parse offer any consulting services ? I've been struggling all week to get a second app created on my hosted parse server. |
Yep, running each in it's own process and own it's own port should work. We don't have any consulting available, no. |
@drew-gross Hope that makes sense, |
@BrandenSandahl I'm gonna try that, makes sense. |
i will dynamically create parse server instance like back4app |
We are planning to have a single mongo db for all our apps by using the collectionPrefix field in parse server. How will this work once we export all data from parse to our own mongo? I am assuming that the export will create separate database for each app and collections will not have a prefix. |
hello, I have on my ubuntu system. Parse-server installed in this directory /the directory/myserver/
and each application0.js, application1.js, application2.js
now if i run it this way, could this way be used
The only way (for now) to run true multiple apps without affecting cloud code and global variables |
That seeems correct! |
Regarding last comments, has anyone managed to do this in a GAE environment? I can run the second app in its own process and port (e.g. 8081), allow the port in |
take a look on this repo
|
Hello, @flovilmart so it seems with @georgesjam solution it is possible to run multiple parse on one server? |
Never said it was impossible, as long as you have each app isolated in it’s own process and a proxy to route to the right local port based on the application ID header. I see pm2 has been used to spawn/manage each server process, which is actually a good way of doing so. You could also use pure nginx reverse proxy, docker containers, swarm, containers etc... We won’t add multi app tenancy here as it doesn’t make sense, because of the plethora of options for doing so. Multi app tenancy could be added by isolating the cloud code process out of parses-server but the performance implications are too high to make it practicle. |
@flovilmart anyway the lib/index.js (from https://github.com/parse-community/parse-server) looks totally different from the parse-server-example |
What do you mean different? Parse-server-example is just an example usage of parse-server that I don’t recommend to use/fork. I personally use the CLI more and we should deprecate it in favor of the CLI. |
@flovilmart can you give a couple of points on why you don't recommend using parse-server-example? I think many people use it as a springboard to get going with Parse and then never leave it. |
yeah that's the main reason actually, it's kinda a mess and doesn't encourage a proper way of managing your code either. The CLI is powerful enough to accomplish a standalone parse-server. I'm not sure what's the best way to manage it. We're investigating yeoman generators and there's also the bootstrap.sh script that literally sets up a parse server in less than 30 seconds. The CLI has the code to start the HTTP server, etc.. it may not fit every single use case, but it's easier to manage than the parse-server-example. |
Cloud functions are not working in this repo. |
Hi. I am trying to have multiple apps on one single parse-server deployment. How is it possible?
Since each app will have different app ids, Is it still possible for apps to coincide?
The text was updated successfully, but these errors were encountered: