yongjhih / docker-parse-server

Provide docker images and docker stack for parse-server npm versions and latest commit
https://hub.docker.com/r/yongjhih/parse-server/
Apache License 2.0
475 stars 166 forks source link

How to scale this? #29

Closed katopz closed 8 years ago

katopz commented 8 years ago

Parse Server Diagram Maybe sharding Mongo? HAProxy? I'm kinda new to this and just try to make sure that I can scale it later. So any idea or guides is welcome.

Thanks

yongjhih commented 8 years ago

Deploy sharded mongo cluster: https://docs.mongodb.org/manual/tutorial/deploy-shard-cluster/

Then, run parse-server with sharded mongo cluster:

$ docker run -d \
             -e DATABASE_URI=mongodb://shard.mongodb.intra:27017/ \
             -e APP_ID=${PARSE_APP_ID}                            \
             -e MASTER_KEY=${PARSE_MASTER_KEY}                    \
             -p 1337:1337                                        \
             -p 2022:22                                          \
             --name parse-server                                 \
             yongjhih/parse-server
katopz commented 8 years ago

Cool thanks, I'll try.

freeznet commented 7 years ago

following on this, how to scale the parse-server, if i using docker-compose scale parse-server=4, i get error since cannot bind on the same host port.