On this repository you will find all the necessary files to run the parse server platform on your own machine using docker and docker-compose.
The stack is composed by the following services:
You need to install the following packages:
In our [docker-compose.yaml] file we have all the services declarations, we have the following services:
- mongo
- parse_server
- parse_dashboard
- mongo_express
To run some docker-compose commands we need to know the name of the service. If do not know about what I'm talking about, just go to the next session and go on, when you see SERVICE_NAME you will remember of this section. If you read this! ;)
# We need to run mongo before any other services.
docker-compose up -d mongo && sleep 5 && docker-compose up -d
docker-compose logs -f SERVICE_NAME
docker-compose rm -sf
docker-compose exec SERVICE_NAME /bin/bash # or /bin/sh or any other command that you need.
One of the most coolest features of parse server, is the cloud code. To enable this feature you need to uncomment the following line on the docker-compose.yaml file:
# Just remove the # on the beginning of the line.
# PARSE_SERVER_CLOUD: ${PARSE_SERVER_CLOUD:-./cloud/main.js}
By default the parse server container will mount the host directory /tmp/cloud and will look for the file main.js inside this directory, but, the looking up procedure will only occours if you uncommend the line mentioned line above.
To set a new location for your custom cloud code, just change the following line on the docker-compose.yaml:
volumes:
- /tmp/cloud:/parse-server/cloud
Change only the /tmp/cloud otherwise the cloud code will not work properly. This feature will only work if you uncomment the line mentioned on the previous section.
This image is prepared for reload the parse server when the the cloud code is modified.