You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-4Lines changed: 34 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ The [Parse Server guide](https://docs.parseplatform.org/parse-server/guide/) is
23
23
---
24
24
25
25
-[Local Development](#local-development)
26
+
-[Docker Deployment](#docker-deployment)
26
27
-[Helpful Scripts](#helpful-scripts)
27
28
-[Remote Deployment](#remote-deployment)
28
29
-[Heroku](#heroku)
@@ -50,19 +51,48 @@ The [Parse Server guide](https://docs.parseplatform.org/parse-server/guide/) is
50
51
7. By default the API route will use `/parse` as a base. You can change this by setting the environment variable `PARSE_MOUNT`, for example in the CLI run run `export PARSE_MOUNT=/app` to set the path to `app`.
51
52
8. Your Parse Server is not running and is connected to your local database named `dev` in which the data is stored that you manage via Parse Server.
52
53
54
+
## Docker Deployment
55
+
56
+
You can also run Parse Server using Docker:
57
+
58
+
1. Create a `.env` file with your configuration variables. For example:
59
+
```env
60
+
APP_ID=myAppId
61
+
MASTER_KEY=myMasterKey
62
+
DATABASE_URI=mongodb://localhost:27017/parse
63
+
PORT=1337
64
+
PARSE_MOUNT=/parse
65
+
```
66
+
67
+
2. Run Docker with the following command, mounting volumes as needed:
68
+
```bash
69
+
docker build -t parse-server .
70
+
docker run -p 1337:1337 --env-file .env \
71
+
-v $(pwd)/logs:/usr/src/parse/logs \
72
+
-v $(pwd)/cloud:/usr/src/parse/cloud \
73
+
parse-server
74
+
```
75
+
76
+
This allows you to:
77
+
- Use an environment file for configuration
78
+
- Mount the logs directory to persist logs outside the container
79
+
- Mount the cloud directory to access your Cloud Code files from the container
80
+
81
+
You can customize the mounted volumes based on your needs, such as mounting config files or other directories that require persistence or runtime modifications.
82
+
53
83
## Helpful Scripts
54
84
These scripts can help you to develop your app for Parse Server:
55
85
56
86
*`npm run watch` will start your Parse Server and restart if you make any changes.
57
-
*`npm run lint` will check the linting of your cloud code, tests and `index.js`, as defined in `.eslintrc.json`.
58
-
*`npm run lint-fix` will attempt fix the linting of your cloud code, tests and `index.js`.
59
-
*`npm run prettier` will help improve the formatting and layout of your cloud code, tests and `index.js`, as defined in `.prettierrc`.
87
+
*`npm run lint` will check the linting of your cloud code, tests and `index.ts`, as defined in `.eslintrc.json`.
88
+
*`npm run lint-fix` will attempt fix the linting of your cloud code, tests and `index.ts`.
89
+
*`npm run prettier` will help improve the formatting and layout of your cloud code, tests and `index.ts`, as defined in `.prettierrc`.
60
90
*`npm test` will run all tests
61
91
*`npm run coverage` will run tests and check coverage. Output is available in the `/coverage` folder.
0 commit comments