Skip to content

Instantly share code, notes, and snippets.

@jinuljt
Last active October 9, 2020 11:32
Show Gist options
  • Save jinuljt/6c2696cdd1fd964ec6415961dafeccc3 to your computer and use it in GitHub Desktop.
Save jinuljt/6c2696cdd1fd964ec6415961dafeccc3 to your computer and use it in GitHub Desktop.
version: '3'
services:
server:
image: parseplatform/parse-server:latest
restart: always
ports:
- '10020:1337'
environment:
PARSE_SERVER_DATABASE_URI: mongodb://mongo/parse-server
PARSE_SERVER_APPLICATION_ID: APPLICATION_ID
PARSE_SERVER_MASTER_KEY: MASTER_KEY
PARSE_SERVER_START_LIVE_QUERY_SERVER: 1
PARSE_SERVER_LIVE_QUERY: '{"classNames":["test"]}'
PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION: 0
depends_on:
- mongo
mongo:
image: mongo:latest
restart: always
volumes:
- mongo-data:/data/db
dashboard:
image: parseplatform/parse-dashboard
restart: always
ports:
- '10029:4040'
environment:
PARSE_DASHBOARD_ALLOW_INSECURE_HTTP: 1
volumes:
- ./parse-dashboard-config.json:/src/Parse-Dashboard/public/parse-dashboard-config.json
volumes:
mongo-data:
@jinuljt
Copy link
Author

jinuljt commented Sep 30, 2020

用docker 启动一个带live query功能的 parse server

查看 parse-server 参数

docker run parseplatform/parse-server parse-server --help

docker-compose.yaml 说明

启动 live query

PARSE_SERVER_START_LIVE_QUERY_SERVER: 1

允许 live query 的表

PARSE_SERVER_LIVE_QUERY: '{"classNames":["Lqtest","lq_test"]}'

禁止客户端创建class

PARSE_SERVER_ALLOW_CLIENT_CLASS_CREATION: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment