Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple example for docker-compose #7793

Open
3 tasks done
ZebNoid opened this issue Jan 29, 2022 · 1 comment
Open
3 tasks done

Add simple example for docker-compose #7793

ZebNoid opened this issue Jan 29, 2022 · 1 comment
Labels
type:docs Only change in the docs or README

Comments

@ZebNoid
Copy link

ZebNoid commented Jan 29, 2022

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

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 29, 2022

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
Labels
type:docs Only change in the docs or README
Projects
None yet
Development

No branches or pull requests

2 participants