Permalink
Browse files

Dockerizing Parse Server (#3005)

* Add Dockerfile

* Add Docker image docs

* Remove default PARSE_SERVER_CLOUD_CODE_MAIN setting + update docs

* Update docs

* Update documentation
  • Loading branch information...
1 parent 2fb4f89 commit 71fb6cef5e2597c4decc8ce7df4a773f74774aeb @woyorus woyorus committed with flovilmart Nov 3, 2016
Showing with 51 additions and 1 deletion.
  1. +21 −0 .dockerignore
  2. +21 −0 Dockerfile
  3. +9 −1 README.md
View
@@ -0,0 +1,21 @@
+node_modules
+npm-debug.log
+*.md
+PATENTS
+LICENSE
+Dockerfile
+.dockerignore
+.gitignore
+.travis.yml
+.istanbul.yml
+.git
+.github
+
+# Build folder
+lib/
+
+# Tests
+spec/
+
+# IDEs
+.idea/
View
@@ -0,0 +1,21 @@
+FROM node:boron
+
+RUN mkdir -p /parse-server
+COPY ./ /parse-server/
+
+RUN mkdir -p /parse-server/config
+VOLUME /parse-server/config
+
+RUN mkdir -p /parse-server/cloud
+VOLUME /parse-server/cloud
+
+WORKDIR /parse-server
+
+RUN npm install && \
+ npm run build
+
+ENV PORT=1337
+
+EXPOSE $PORT
+
+ENTRYPOINT ["npm", "start", "--"]
View
@@ -16,14 +16,22 @@ April 2016 - We created a series of video screencasts, please check them out her
The fastest and easiest way to get started is to run MongoDB and Parse Server locally.
-## Running Parse Server locally
+## Running Parse Server
+### Locally
```
$ npm install -g parse-server mongodb-runner
$ mongodb-runner start
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://localhost/test
```
+### Inside a Docker container
+```
+$ docker build --tag my-parse-server .
+$ docker run --name my-mongo -d mongo
+$ docker run --name my-parse-server --link my-mongo:mongo parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test
+```
+
You can use any arbitrary string as your application id and master key. These will be used by your clients to authenticate with the Parse Server.
That's it! You are now running a standalone version of Parse Server on your machine.

4 comments on commit 71fb6ce

@jeveloper

personally, i've been using this project
https://github.com/yongjhih/docker-parse-server

Its really well done

@flovilmart
Collaborator

This docker implementation is un-opinionated, un-bloated and focused on parse-server. The project you describe has it's own reposition, and many many files, while the image here only a few lines of code.

@Sadmansamee
Sadmansamee commented on 71fb6ce Nov 4, 2016 edited

@flovilmart How can we run Parse-Server-Example with this Dockerizing?

@flovilmart
Collaborator

Not sure how, because that docker explicitely makes the usage of the CLI not a custom express app like Parse-server-example.

Please sign in to comment.