Skip to content

Add simple example for docker-compose #7793

Open

Description

@ZebNoid

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

Activity

  1. parse-github-assistant commented on Jan 29, 2022

    @parse-github-assistant

    Thanks for opening this issue!

    • 🎉 We are excited about your ideas for improvement!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:docsOnly change in the docs or README

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions