Skip to content
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

Dockerizing Parse Server #3005

Merged
merged 5 commits into from
Nov 3, 2016
Merged

Dockerizing Parse Server #3005

merged 5 commits into from
Nov 3, 2016

Conversation

woyorus
Copy link
Contributor

@woyorus 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 :-)

@@ -24,6 +24,13 @@ $ mongodb-runner start
$ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb:https://localhost/test
```

You can run a Docker container instead
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@facebook-github-bot
Copy link

@woyorus updated the pull request - view changes

Copy link
Contributor

@TylerBrock TylerBrock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 parse-community:master Nov 3, 2016
@ranhsd
Copy link
Contributor

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?

Thanks,
Ran.

@flovilmart
Copy link
Contributor

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
Copy link
Contributor

ranhsd commented Nov 28, 2016

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

@flovilmart
Copy link
Contributor

@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
Copy link
Contributor

TylerBrock commented Nov 28, 2016

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.

@flovilmart
Copy link
Contributor

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants