• Stars
    star
    147
  • Rank 251,347 (Top 5 %)
  • Language
    JavaScript
  • License
    Do What The F*ck ...
  • Created almost 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Quickly and easily install a Parse server and deploy code using git push.

docker-parse-server-git-deploy

Quickly and easily install a Parse server and deploy code using git push.

You should not have to write any code to have a production server, like you would with a parse.com service.

Pull-Request are welcomed.

Quick start

  • Create a db on https://mongolab.com/

  • Copy example/data to the machine you will use to deploy this container:

cp -r example/data /srv/parse-data
  • Replace the ssh public key in /srv/parse-data/keys by your own.

  • Execute the following command:

docker run -d \
       -v /srv/parse-data:/srv \
       -e DATABASE_URI=mongodb://<user>:<password>@ds055885.mongolab.com:55885/codetown \
       -e APP_ID=<appId> \
       -e MASTER_KEY=<masterKey> \
       -p 1337:1337 \
       -p 2222:22 \
       --name parse arnaudvalensi/docker-parse-server-git-deploy:latest

Replace <user> and <password> by yours. Replace <appId> and <masterKey> too.

  • The container now provides a git repository, clone it:
git clone ssh://root@<yourhost>:2222/srv/repo.git ~/parse-cloud

Replace <yourhost> by your own host.

  • Add the code in example/parse-cloud into your repo and push:
cp -r example/parse-cloud/* ~/parse-cloud
cd ~/parse-cloud
git add *
git commit -m "add base files"
git push

Your Parse server is now in production. Every time you want to modify the cloud, you just need to push to restart the server with the new files.

The file cloud/server.js allows you to configure the express server before it is started. You can modify it to configure new routes or any express behavior.

Verification

curl -v http://<yourhost>:1337

curl -X POST \
  -H "X-Parse-Application-Id: <YOUR_APP_ID>" \
  -H "Content-Type: application/json" \
  -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
  http://<yourhost>:1337/parse/classes/GameScore

curl -X GET \
  -H "X-Parse-Application-Id: <YOUR_APP_ID>" \
  -H "X-Parse-Master-Key: <YOUR_APP_MASTER_KEY>" \
  http://<yourhost>:1337/parse/classes/GameScore

You can use https://robomongo.org/ to see your db.

Deploy with your own mongodb container

docker run -d -p 27017:27017 --name mongo mongo

docker run -d \
       -v /srv/parse-data:/srv \
       -e APP_ID=<appId> \
       -e MASTER_KEY=<masterKey> \
       -p 1337:1337 \
       -p 2222:22 \
       --link mongo \
       --name parse arnaudvalensi/docker-parse-server-git-deploy:latest
  • api: localhost:1337
  • ssh: localhost: 2222
  • mongodb: localhost:27017

More configuration with docker

  • Specify application ID: -e APP_ID
  • Specify master key: -e MASTER_KEY=
  • Specify database uri: -e DATABASE_URI=mongodb://mongodb.intra:27017/dev
  • Specify parse-server port on host: -p 1338:1337
  • Specify database port on host: -p 27018:27017
  • Specify parse cloud code volume container: --volumes-from parse-cloud-code
  • Specify parse-server prefix: -e PARSE_MOUNT=/parse

To build the container from the Dockerfile

docker build -t parse-server .

More Repositories

1

node-express-sequelize-es2015

A boilerplate using NodeJs, Express, Sequelize, Apidoc, Eslint, Mocha, Cluster and the best practices.
JavaScript
86
star
2

warfest-voxel-unity

A voxel game prototype made with Unity
C#
39
star
3

ArnaudValensi.github.io

ArnaudValensi's website
JavaScript
35
star
4

node-jsencrypt

A port of JSEncrypt to NodeJS
JavaScript
28
star
5

vec-tree

A safe tree using an arena allocator that allows deletion without suffering from the ABA problem by using generational indices. https://docs.rs/vec-tree/0.1.0/vec_tree/
Rust
27
star
6

xdg-menu-to-awesome-wm

Converts a xdg-menu like gnome menu awesome wm format
Python
14
star
7

2d-game-engine-cpp-opengl

A little C++ game engine with opengl and imgui to quickly make games.
C++
5
star
8

egghead-rss-downloader

Egghead RSS Video Downloader
JavaScript
2
star
9

nelua-sdl2-emscripten-docker

Shell
2
star
10

lxc-ovh

Shell
2
star
11

hermit-crab

Global Game Jam 2019 using pico-8
Lua
2
star
12

simple-stacktrace

A single header file to display a stacktrace with symbol/file/line number in C/C++ on MacOs
C
1
star
13

Tapas

A minimalist yet complete C# testing library that output TAP format to be combined with other tools.
C#
1
star
14

voxel-game-engine-rust

A voxel based game engine implemented in rust-lang
Rust
1
star
15

pixel-art-palette-generator

JavaScript
1
star
16

the-most-of-us

PICO-8 demake of a popular game.
Lua
1
star
17

Transmiss.io

GGJ2018
C#
1
star
18

hack_framework

A framework with some hack tools
Shell
1
star
19

test-stacktrace

C++
1
star
20

android-wifi-robot

An Arduino Robot with an Android phone embed to stream video and be drive with WiFi or 3g
C++
1
star