-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Create new apps using dashboard #188
Comments
You can use a Parse Hosting solution to do it for you. You can find the actual options here: |
Parse Server doesn't support multiple apps on one server, so this is a long way off. One thing we could do is allow you to add apps to your configuration file in a dialog on the dashboard. |
I think this will be very useful,
That will be about 80% of the work that I should do manually now, |
This is not supported in parse-server. |
@flovilmart What about that:
|
That is how to initialize Parseserver, but you can't swap this configuration at runtime based on some configuration from parse-dashboard |
What about new instance of parse server,
|
That won't work correctly due to the Parse SDK being a singleton. |
wow :( |
what do you mean? Multiple apps support could theoretically work, but without Cloud Code. I've worked on it for a while and had a functional proposal, in the end, we decided not to support it. |
I mean that me and all developers moved from parse.com hosted solution are looking for an easy GUI to work with, |
you can run it with just a command line tool and a config.json file. It basically takes 10 minutes to configure and deploy heroku. there is also parse-server/bootstrap.sh that you can run in a clean folder that would build the basic parse-server folder structure.
|
We (Buddy) are thinking of handling this case as well, with some kind of a webhook that ultimately calls our devops code to create the server. I don't think anybody would want our devops code, but we could certainly submit a PR that does what @drew-gross describes, along with some kind of "create server instance" adapter that accepts the necessary values, and the UI to collect them. Other folks could plug in their own heroku or aws solution. Would this be welcome? |
I believe this is really overkill, but that's my take on it. |
@agilekevin that sounds pretty sweet, I'd happily accept a PR that puts "pluggable app creation" into the dashboard. A nice simple way to do that might be to put the "create new app" webhook URL into the dashboard config, and if the dashboard detects the presence of this URL, it enables the "create new app" button, and sends requests to that URL. There would probably need to be some sort of auth, too, which might be a harder problem. I look forward to seeing what you come up with! #23 removed the code for the "create new app" button, reverting that PR in your fork would probably be a good starting point. |
Hey guys, in my opinion this feature only make sense if in the creation process the user is able to setup all parameters of parse server (databaseURI, cloud, appId, etc...). Otherwise the user will have to change the code anyway and restart the app process. If you think by this same way, I can contribute in this task. I have been writing my own UI to setup these parameters. So I can stop doing it alone and help you (if you think it is a good idea). |
Yeah that makes sense. For the fully managed parse hosting services, they may only need an app name, since they can generate a master key, app id, and database for you. Cloud code would need it's own process, of course. Maybe the dashboard config can include a list of parameters and their description alongside the webhook, and the dashboard can dynamically create the "create an app" dialog from that list. Maybe I'm dreaming too much though :p any PR that helps companies offering Parse Hosting do a better job, I would accept, as long as it doesn't degrade the experience for people hosting Parse themselves. |
On parse-server side, it would be fairly easy to load the parse config from a JSON and live reload. |
We should create a new project just called Parse (or Parse Proxy, or Parse Manager, or whatever) which would initialy have the responsibility of:
It would obviously be written in node.js/express.js and installed globally. It would have a script called "parse generate" to create a new parse project and a "parse run" to start this project. Therefore the developer locally should only do: Then, open the dashboard using a web browser and start visually creating the apps. You can imagine I have big part of the required code already written. I can remove the pieces there are specific to my case, share it to community and help to turn it real. What do you think? |
Back on the original idea of creating new apps within the UI, here's what I think we're seeing that there are two interests here: folks who want to be able to /specify/ the several values for a server they just set up themselves, and folks (like me) who want a way to call out to some code that /creates/ these values. For both of these experiences, we have to consider the other operations: The specified values will want for the ability to edit them. And both the specified and created entries will need to be deleted, so there's overlap there. What I'm thinking is that the first thing that goes into the config file would be the names of React components/apps to use for each of the three operations (possibly none): NewAppDialog, EditAppConfigDialog, and DeleteAppDialog. The main parse code can display these (if configured) in the right context, but dedicate their operation to the component itself. For example, the NewAppDialog will probably be triggered from the top right, while the Edit and Delete components would appear on each line. In my create approach, where the creation only needs a name and then calls out to a webhook, I'll specify a component with that simple UI, and it also will have a config value for the webhook to call. Delete will also have a simple UI and a webhook, and I wouldn't specify Edit at all since it doesn't apply. In the /specify/ approach, the Create dialog will show the more complicated UI, and have perhaps a config value for the file to edit, which is shared by the Edit and Delete components. If that sounds good, I'll get started on a PR for that. |
@agilekevin sounds like a good approach, I'd suggest doing them each in a separate PR to keep things nice and isolated. |
I'm not sure if I'm following the right direction but I've been working on a new Parse app that has only three classes: Apps, Users and Installation. After some tweaks and with some minor dashboard adaptations I think I will be able to include new apps as simple as adding a new row to the Apps' class. To create a new app I've done the following steps:
If you are using Amazon:
My parse server loops a configuration file served from the app above and start each app in a different port number. The downside of this approach is that all apps will be unavailable for a few moments while the apache is restarting, so my next goal is to separate each parse server and have only one api.myserver.com redirecting each request to the right port. In my current environment I've a proxy for each app in my httpd.conf but unfortunately I still have an issue removing rows. Despite the deadline I've moved 22 apps to a self hosted MongoDB, created automation scripts to backup and restore and replicated the data on a local MongoDB server so we can test our apps in a sandbox mode. |
I looked through this long conversation and also searched a lot, but I could find answer to my question: Is it possible to create new apps using Parse Server/Dashboard? Thanks |
Why is not showing few feature in parse dashboard in local installation? how can i got this thing? |
@felipemobile approach seems the way to go. If there is anyone willing to share any code, I'll be glad to help getting it production ready. |
@YousefAlsbaihi looks nice. If you could share your repository or rise a PR it would be nice to have a look on how that was implemented. Thank you |
Did @YousefAlsbaihi send a PR ? |
Was this feature removed when they OS the project? https://parseplatform.github.io/docs/rest/guide/#apps @YousefAlsbaihi or @felipemobile have you made any progress? |
Hi, at the moment just creating ONE express (app) listen directive (upon ONE single port) and MULTIPLE ParseServer() DO the work. I'm able to create how many parse apps I want, and I'm able to have them working in my dashboard. Tell me if you want support for this, please. Cheers |
It will fail lamentably with cloud code when you'll have concurrent async requests. So no, it doesn't work... |
Oh ok, so there is not a way to host multiple apps on the same server? I mean, am I supposed to use Parse-Server with only one app at maximum? Thanks |
You can run multiple node processes, on different ports. But no, ATM (and probably for a while), it's dangerous to run multiple apps in the Same process. |
@flovilmart I think this is a deep limitation, I should bind a separate express.js server (one-per-app) listening on a separate port? On Heroku, furthermore, with Free Plan, having more than 1 Web Dyno is not possible (Ok, it's a sandbox environment, I know.. but.....). So should I mount, in example: APP1: Parse Server XXXX running on port WWWW with its own dashboard etc. Would at least one MongoDB server be enough for all apps or should i have a separate instante-per-server? And, at last. You mentiond cloud issues, due to Singleton nature of Parse Server actually. But what if I use only GridStore as file adapter? Might I in that case use more apps on same server ? Thank you so much |
No, you need process level isolation due to the singleton nature of the JS Sdk. Parseserver iself is fine with multiple app ID's. And we don't explicitly support that feature, as such, I won't go to the extend to describe a way to make it work, as it may break in future updates. |
Just saying, I disagree. I run separate apps using PM2, and right now I have two running on the same server. They're created in different directories, as such
|
Yes, that work, because you have process isolation. Each app is running in a separate node process. |
Again, creating a new app on an existing process won't work correctly, that's why this issue is closed. If you want to achieve that, you need something to spawn a process for each app, which is what PM2 is doing as it's just a process manager. |
So why can't Parse just append a new instance of itself? |
In other words, cause Parse to spawn a new PM2 process
|
It could, but I don't like being tied to PM2. So it won't. You can very well write this externally, it doesn't have to be done inside parse-server. |
Can you suggest how to to do this? I'm not extremely Node/Express savvy |
Your pseudo code seems to be ok, I believe you can figure it out. You'd probably need to store the configurations somewhere à user can retrieve them etc... the best part is that you can pretty much write that in any language of your choice, as this is just writing some Json as the parse config and reconfigure pm2 |
I was using Parse.com to host about 7 or 8 apps and I was creating new app every 2 weeks,
I was using it mainly to send push notification as it's very easy to integrate,
And like a lot of app developers I don't have experience to deal with "Node, MongoDB, ..." ,
So it will be very useful if you can add the ability to:
So we could easily "create apps -> get keys -> integrate -> 'add certificates / GMC' -> Push"
Thanks
The text was updated successfully, but these errors were encountered: