Skip to content

Commit ccb6c04

Browse files
authored
Add cloud parameter to Docker command (#6988) (#6990)
* Add `cloud` parameter to Docker command (#6988) * Add note to run Image with Cloud Code feature.
1 parent bbae55d commit ccb6c04

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,22 @@ $ parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongo
9292

9393

9494
### Inside a Docker container
95+
9596
```bash
9697
$ git clone https://github.com/parse-community/parse-server
9798
$ cd parse-server
9899
$ docker build --tag parse-server .
99100
$ docker run --name my-mongo -d mongo
100-
$ docker run --name my-parse-server -v cloud-code-vol:/parse-server/cloud -v config-vol:/parse-server/config -p 1337:1337 --link my-mongo:mongo -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test
101101
```
102102

103+
#### Running the Parse Server Image
104+
105+
```bash
106+
$ docker run --name my-parse-server -v config-vol:/parse-server/config -p 1337:1337 --link my-mongo:mongo -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test
107+
```
108+
109+
***Note:*** *If you want to use [Cloud Code](https://docs.parseplatform.org/cloudcode/guide/) feature, please add `-v cloud-code-vol:/parse-server/cloud --cloud /parse-server/cloud/main.js` to command above. Make sure the `main.js` file is available in the `cloud-code-vol` directory before run this command. Otherwise, an error will occur.*
110+
103111
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.
104112

105113
That's it! You are now running a standalone version of Parse Server on your machine.
@@ -472,9 +480,16 @@ $ git clone https://github.com/parse-community/parse-server
472480
$ cd parse-server
473481
$ docker build --tag parse-server .
474482
$ docker run --name my-mongo -d mongo
475-
$ docker run --name my-parse-server --link my-mongo:mongo -v cloud-code-vol:/parse-server/cloud -v config-vol:/parse-server/config -p 1337:1337 -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test --publicServerURL http://localhost:1337/parse --mountGraphQL --mountPlayground
476483
```
477484

485+
#### Running the Parse Server Image
486+
487+
```bash
488+
$ docker run --name my-parse-server --link my-mongo:mongo -v config-vol:/parse-server/config -p 1337:1337 -d parse-server --appId APPLICATION_ID --masterKey MASTER_KEY --databaseURI mongodb://mongo/test --publicServerURL http://localhost:1337/parse --mountGraphQL --mountPlayground
489+
```
490+
491+
***Note:*** *If you want to use [Cloud Code](https://docs.parseplatform.org/cloudcode/guide/) feature, please add `-v cloud-code-vol:/parse-server/cloud --cloud /parse-server/cloud/main.js` to command above. Make sure the `main.js` file is available in the `cloud-code-vol` directory before run this command. Otherwise, an error will occur.*
492+
478493
After starting the server, you can visit http://localhost:1337/playground in your browser to start playing with your GraphQL API.
479494

480495
***Note:*** Do ***NOT*** use --mountPlayground option in production. [Parse Dashboard](https://github.com/parse-community/parse-dashboard) has a built-in GraphQL Playground and it is the recommended option for production apps.

0 commit comments

Comments
 (0)