parse-community / parse-community/parse-server

Add simple example for docker-compose

Open
#7,793 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:docs
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

New Feature / Enhancement Checklist
Current Limitation

Hard to config docker compose for parseplatform/parse-server.
No documentation on environment variable with examples.
No simple example of config file for parse server.
There is no mention that if cloud path is not set in config or PARSE_SERVER_CLOUD variable cloud code wouldn't work.

Feature / Enhancement Description

Add simple docker compose exmple.

Example Use Case

Simple docker-compose.yml config

version: "3.9"

networks:
  backend:
    name: backend

services:
  mongo:
    image: mongo:latest
    container_name: mongo
    ports:
      - "27017:27017"
    volumes:
      - ./.data-db:/data/db
    networks:
      - backend

  parse:
    image: parseplatform/parse-server:latest
    container_name: server
    ports:
      - "1337:1337"
    depends_on:
      - mongo
    volumes:
      - ./cloud-code:/parse-server/cloud
      - ./config/parse-config.json:/parse-server/config/parse-config.json
    entrypoint: ["node", "./bin/parse-server", "./config/parse-config.json"]
    networks:
      - backend

  dashboard:
    image: parseplatform/parse-dashboard:latest
    container_name: dashboard
    ports:
      - "4040:4040"
    environment:
      - PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1
    volumes:
      - ./config/parse-dashboard-config.json:/src/Parse-Dashboard/parse-dashboard-config.json
    networks:
      - backend

Simple config file for parse server parse-config.json Parse server options

{
    "appId": "yourappid",
    "masterKey": "yourmasterkey",
    "databaseURI": "mongodb://mongo:27017/dev",
    "cloud": "./cloud/main.js",
    "startLiveQueryServer": true,
    "liveQuery":
    {
        "classNames":
        [
            "Todo"
        ]
    },
    "push":
    {
        "android":
        {
            "senderId": "<firebase_cloud_messaging_sender_id>",
            "apiKey": "<firebase_cloud_messaging_server_key>"
        }
    }
}

Simple config for parse dashboard parse-dashboard-config.json

{
  "apps": [
    {
      "serverURL": "http://localhost:1337/parse",
      "appId": "yourappid",
      "masterKey": "yourmasterkey",
      "appName": "ParseApp"
    }
  ],
  "users":
  [
    {
      "user":"admin",
      "pass":"pass"
    }
  ]
}

Alternatives / Workarounds

All environment variable can be found here Definitions.js but there is no wiki page or mention of this file.

3rd Party References

n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Options/Definitions.js to identify the environment variables that need examples, then review the provided docker-compose.yml, parse-config.json, and parse-dashboard-config.json examples. Done means adding a simple documented Docker Compose example that explains the cloud path requirement and the relevant configuration values.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker-compose, mongodb, node.js
Domain
devops, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.