需要对docker以及docker compose有一定的了解
首先需要安装docker以及docker-compose: docker安装 和 ubuntu安装docker 或许可以帮到你
version: '3'
services:
mongo:
image: mongo
ports:
- 27017:27017
volumes:
- ./services/mongo/data:/data/db
parse:
image: parseplatform/parse-server
ports:
- 1337:1337
links:
- mongo
environment:
- PARSE_SERVER_APPLICATION_ID=yourappid
- PARSE_SERVER_MASTER_KEY=yourmasterkey
- PARSE_SERVER_DATABASE_URI=mongodb://mongo:27017/parse
restart: always
dashboard:
image: parseplatform/parse-dashboard
ports:
- 4040:4040
environment:
- PARSE_DASHBOARD_SERVER_URL=http://localhost:1337/parse
- PARSE_DASHBOARD_APP_ID=ypassourappid
- PARSE_DASHBOARD_MASTER_KEY=yourmasterkey
- PARSE_DASHBOARD_APP_NAME=MyApp
- PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1
- PARSE_DASHBOARD_USER_ID=user
- PARSE_DASHBOARD_USER_PASSWORD=pass
主要是修改几个环境变量:
进入到docker-compose.yml
所在的文件夹运行 docker-compose up
即可。
整个项目我上传到GitHub了,地址:https://github.com/luvvien/docker-compose-parse-server-dashboard
可以直接clone使用
git clone git@github.com:luvvien/docker-compose-parse-server-dashboard.git
cd docker-compose-parse-server-dashboard
docker-compose up
viencoding.com版权所有,允许转载,但转载请注明出处和原文链接: https://viencoding.com/article/197