I’m using docker and docker-compose to easily setup parser-server for a project using the parseplatform/parse-server image.
So far everything runs perfectly and I can go and manually add the classes I need for the app via the parse-dashboard, but I would like to automate this.
Is there any way to pass a schema on parse first run to populate the database with the required classes? I’m keeping PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION as false.
Any ENV variables that I’m not aware of? Is the only alternative pulling the repo and building the image with some custom config?
As far my search went I can’t find any info on the subject. Parse seems to be a very powerful tool, but the docs tend to be very simplistic as far I’ve seen.
Yes, you can create Cloud Code functions like the ones in my repo:
and then call them in the server index.js file after the server is created:
Feel free to look through the rest of the files/repo for suggestions. Note that this repo produces a docker image, so can definitely do it with docker: Docker Hub
Thanks a lot for the tip @cbaker6 . I guess a cloud-function to check the schema and create classes if they aren’t present is a good workaround for now.
I found in other post that a predefined schemas are coming for v. 5