Dockerizing Parse Server #3005

merged 5 commits into from Nov 3, 2016


None yet

5 participants

woyorus commented Nov 3, 2016

Hey everyone,

Since me and my company is running parse-server in our container clusters in production, we are really missing an official Docker image with Parse-server that is configurable and not over-bloated with stuff. We ended up making our own Parse Server image which you can see in this PR.
It is pretty simple, yet configurable. You can configure the same way you configure parse-server, either with environment variables or by passing parameters. Also, you can attach a volume with your JSON configuration and pass the path to it when you run container. Besides, you can also attach a volume with your Cloud Code.

Eventually we would love to see an official Parse Server on Docker Hub, so that we can simply pull it from there (ideally, tagged for a specific version, like docker pull parseplatform/parse-server:2.2.25). That would be really handy for us, and I bet for many other out there.

If you have any concerns or you want anything to be different, feel free to comment and I will do it :-)

woyorus added some commits Nov 3, 2016
@woyorus woyorus Add Dockerfile 958d79b
@woyorus woyorus Add Docker image docs 6373197
@woyorus woyorus Remove default PARSE_SERVER_CLOUD_CODE_MAIN setting + update docs 6d5da98
@woyorus woyorus Update docs
@@ -24,6 +24,13 @@ $ mongodb-runner start
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test
+You can run a Docker container instead
flovilmart Nov 3, 2016 Collaborator

make a section :### Docker instead of that.

@woyorus woyorus Update documentation

@woyorus updated the pull request - view changes


This seems like a good starting point, im sure it will evolve over time. Thanks for creating this for us.

@flovilmart flovilmart merged commit 71fb6ce into ParsePlatform:master Nov 3, 2016

3 checks passed

codecov/patch Coverage not affected when comparing 2fb4f89...6cc6907
codecov/project 92.37% (target 90.00%)
continuous-integration/travis-ci/pr The Travis CI build passed
ranhsd commented Nov 28, 2016

hi @woyorus
the Dockerfile contains the following line:

RUN npm install && \
    npm run build

The easiest way to start with parse-server is to provide it as a dependency into your expressjs project like in this example
so the npm run build is not relevant here (only npm install) unless you want to build your custom code which is usually the code inside index.js and your cloud code (unless parse-server is only one of your middlewares and your express app do more than just mount parse server) .

So from what i understand the npm run build is specific for users who want to deploy parse-server without creating an expressjs app... That is correct?



The easiest way to start with parse-server is to provide it as a dependency into your expressjs

Nah, that's the complicated way.

ranhsd commented Nov 28, 2016

@flovilmart it's strange because for me the deployment of parse-server as it is was the complicated thing :)


@ranhsd the easiest way:

mkdir my-parse-server
cd my-parse-server
npm init
npm install --save parse-server
./node_module/.bin/parse-server --appId hello --masterKey world
TylerBrock commented Nov 28, 2016 edited

Could you make it even easier by doing npm install --save -g parse-server then parse-server --appId hello --masterKey world? I think you can also remove the npm init.


problem is when we build the docker img, the package may not be available :)

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