
Parse Dashboard 是一个独立的仪表板工具,用于管理 https://github.com/ParsePlatform/parse-server 应用。它提供可视化界面,支持数据浏览、用户管理、推送通知配置、GraphQL 调试等核心功能,适用于开发和生产环境中对 Parse Server 应用的集中管理。
安装方式
通过 npm 全局安装:
bashnpm install -g parse-dashboard
快速启动(单应用)
直接通过命令行参数启动,适用于快速测试:
bashparse-dashboard --appId 你的AppId --masterKey 你的MasterKey --serverURL "https://example.com/parse" --appName "应用名称"
注意:
--dev参数会禁用生产环境安全特性,仅用于本地开发,生产环境切勿使用。
Parse Dashboard 支持通过配置文件或环境变量进行配置,推荐生产环境使用配置文件。
配置文件(推荐)
创建 JSON 格式配置文件(如 parse-dashboard-config.json),支持单应用或多应用配置。
单应用配置示例
json{ "apps": [ { "serverURL": "http://localhost:1337/parse", // Parse Server 地址 "appId": "myAppId", // 应用 ID "masterKey": "myMasterKey", // Master Key "appName": "MyApp", // 应用名称(显示用) "production": false // 是否为生产环境(默认 false) } ] }
通过配置文件启动:
bashparse-dashboard --config parse-dashboard-config.json
多应用配置示例
在 apps 数组中添加多个应用配置:
json{ "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "app1Id", "masterKey": "app1MasterKey", "appName": "应用1" }, { "serverURL": "http://localhost:1337/parse2", "appId": "app2Id", "masterKey": "app2MasterKey", "appName": "应用2" } ] }
环境变量配置
仅支持通过 parse-dashboard 命令启动时使用,分为单应用和多应用两种模式。
单应用环境变量
| 环境变量 | 说明 | 示例值 |
|---|---|---|
HOST | 绑定主机地址 | 0.0.0.0 |
PORT | 监听端口 | 4040 |
MOUNT_PATH | 访问路径前缀 | /dashboard |
PARSE_DASHBOARD_SERVER_URL | Parse Server 地址 | http://localhost:1337/parse |
PARSE_DASHBOARD_APP_ID | 应用 ID | myAppId |
PARSE_DASHBOARD_MASTER_KEY | Master Key | myMasterKey |
PARSE_DASHBOARD_APP_NAME | 应用名称 | MyApp |
PARSE_DASHBOARD_USER_ID | 基本认证用户名(单用户) | admin |
PARSE_DASHBOARD_USER_PASSWORD | 基本认证密码(单用户) | securePassword |
多应用环境变量
通过 PARSE_DASHBOARD_CONFIG 环境变量传入完整 JSON 配置(与配置文件格式一致):
bashexport PARSE_DASHBOARD_CONFIG='{"apps":[{"serverURL":"http://localhost:1337/parse","appId":"app1","masterKey":"key1","appName":"应用1"},{"serverURL":"http://localhost:1337/parse2","appId":"app2","masterKey":"key2","appName":"应用2"}]}' parse-dashboard
应用标识自定义
应用图标配置
iconsFolder,相对于配置文件路径)iconName(包含文件扩展名)json{ "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "myAppId", "masterKey": "myMasterKey", "appName": "MyApp", "iconName": "app-icon.png" // 图标文件名 } ], "iconsFolder": "icons" // 图标目录(存放 app-icon.png 等文件) }
应用背景色配置
通过 primaryBackgroundColor 和 secondaryBackgroundColor 配置应用列表中的背景色(支持 CSS 颜色格式):
json{ "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "myAppId", "masterKey": "myMasterKey", "appName": "MyApp", "primaryBackgroundColor": "#FFA500", // 主背景色(橙色) "secondaryBackgroundColor": "#FF4500" // 次背景色(橙红色) } ] }
GraphQL Playground 配置
若 Parse Server 启用了 GraphQL API,可通过以下方式在 Dashboard 中集成 GraphQL Playground:
--graphQLServerURL "https://example.com/graphql"PARSE_DASHBOARD_GRAPHQL_SERVER_URL="https://example.com/graphql"graphQLServerURL 字段json{ "apps": [ { "serverURL": "http://localhost:1337/parse", "graphQLServerURL": "http://localhost:1337/graphql", // GraphQL API 地址 "appId": "myAppId", "masterKey": "myMasterKey", "appName": "MyApp" } ] }
启动后可通过 http://localhost:4040/apps/应用名称/api_console/graphql 访问 Playground。
列排序控制
通过 columnPreference 配置特定数据类的列是否允许排序(preventSort: true 禁用排序):
json{ "apps": [ { "appId": "myAppId", "columnPreference": { "_User": [ // 对 _User 类配置 { "name": "createdAt", // 字段名 "visible": true, // 是否显示 "preventSort": true // 禁用排序 }, { "name": "updatedAt", "visible": true, "preventSort": false // 允许排序 } ] } } ] }
可将 Parse Dashboard 集成到现有 Express 应用中,作为中间件运行:
javascriptconst express = require('express'); const ParseDashboard = require('parse-dashboard'); // 配置 Dashboard const dashboard = new ParseDashboard({ "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "myAppId", "masterKey": "myMasterKey", "appName": "MyApp" } ] }); const app = express(); app.use('/dashboard', dashboard); // 将 Dashboard 挂载到 /dashboard 路径 // 启动服务 const httpServer = require('http').createServer(app); httpServer.listen(4040, () => { console.log('Parse Dashboard 运行在 http://localhost:4040/dashboard'); });
若需同时运行 Parse Server 和 Dashboard,可将两者作为中间件挂载到同一 Express 应用:
javascriptconst express = require('express'); const ParseServer = require('parse-server').ParseServer; const ParseDashboard = require('parse-dashboard'); // 配置 Parse Server const api = new ParseServer({ databaseURI: 'mongodb://localhost:27017/dev', appId: 'myAppId', masterKey: 'myMasterKey', serverURL: 'http://localhost:4040/parse' }); // 配置 Dashboard const dashboard = new ParseDashboard({ "apps": [{"appId": "myAppId", "masterKey": "myMasterKey", "serverURL": "http://localhost:4040/parse", "appName": "MyApp"}] }); const app = express(); app.use('/parse', api); // Parse Server 挂载到 /parse app.use('/dashboard', dashboard); // Dashboard 挂载到 /dashboard httpServer.listen(4040);
parseplatform/parse-dashboard通过命令行参数直接启动,适用于快速测试:
bashdocker run -d -p 4040:4040 \ parseplatform/parse-dashboard \ --appId 你的AppId \ --masterKey 你的MasterKey \ --serverURL "https://example.com/parse" \ --appName "应用名称"
挂载本地配置文件到容器中,支持复杂配置(多应用、认证等):
parse-dashboard-config.json(参考上文配置文件格式)bashdocker run -d -p 4040:4040 \ -v /本地路径/parse-dashboard-config.json:/src/Parse-Dashboard/parse-dashboard-config.json \ parseplatform/parse-dashboard \ --config /src/Parse-Dashboard/parse-dashboard-config.json
生产环境需注意:
--dev 参数示例(指定端口和生产配置):
bashdocker run -d -p 80:8080 \ -v /本地路径/parse-dashboard-config.json:/src/Parse-Dashboard/parse-dashboard-config.json \ parseplatform/parse-dashboard \ --config /src/Parse-Dashboard/parse-dashboard-config.json \ --port 8080 # 容器内端口,映射到主机 80 端口
通过配置文件添加用户,支持明文密码或 bcrypt 加密密码(useEncryptedPasswords: true 启用加密):
json{ "apps": [{"...": "..."}], "users": [ { "user": "admin", // 用户名 "pass": "$2b$10$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" // bcrypt 加密密码 }, { "user": "viewer", "pass": "viewer123" // 明文密码(不推荐生产环境) } ], "useEncryptedPasswords": true // 启用 bcrypt 加密验证 }
限制用户可管理的应用,通过 apps 字段指定用户可访问的应用 ID:
json{ "apps": [ {"appId": "app1", "masterKey": "key1", "appName": "应用1"}, {"appId": "app2", "masterKey": "key2", "appName": "应用2"} ], "users": [ { "user": "admin", "pass": "admin123", "apps": [{"appId": "app1"}, {"appId": "app2"}] // 可管理 app1 和 app2 }, { "user": "app1-viewer", "pass": "viewer123", "apps": [{"appId": "app1"}] // 仅可管理 app1 } ] }
应用级只读
使用 Parse Server 的 readOnlyMasterKey(需 Parse Server ≥ 2.6.5),在 Dashboard 配置中替换 masterKey 为 readOnlyMasterKey:
json{ "apps": [ { "serverURL": "http://localhost:1337/parse", "appId": "myAppId", "masterKey": "只读MasterKey", // 使用只读 Key "appName": "只读应用" } ] }
用户级只读
在用户配置中添加 readOnly: true,限制该用户对所有应用的写操作:
json{ "users": [ { "user": "viewer", "pass": "viewer123", "readOnly": true, // 只读用户 "apps": [{"appId": "app1"}, {"appId": "app2"}] } ] }
应用级用户只读
指定用户对特定应用的只读权限(需应用配置中提供 readOnlyMasterKey):
json{ "apps": [ { "appId": "app1", "masterKey": "完整权限Key", "readOnlyMasterKey": "只读Key", // 应用级只读 Key "serverURL": "http://localhost:1337/parse" } ], "users": [ { "user": "viewer", "pass": "viewer123", "apps": [{"appId": "app1", "readOnly": true}] // 对 app1 只读 } ] }
--sslKey 和 --sslCert 参数)--trustProxy=1 以正确识别客户端连接(依赖 X-Forwarded-* 头)您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务