gpt4 book ai didi

docker - 配置用户以远程访问Parse Dashboard

转载 作者:行者123 更新时间:2023-12-02 19:36:50 26 4
gpt4 key购买 nike

这是我尝试访问在Docker(本地)上运行的parse-dashboard的内容

enter image description here

这是我运行的docker命令:

docker run -d -p 4040:4040 --name myappname-local-dashboard -e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 -e USER1=admin  -e USER1_PASSWORD=pass -v /home/xybrek/parse-dashboard/config.json:/home/xybrek/parse-dashboard/Parse-Dashboard/parse-dashboard-config.json parse-dashboard

config.json
{  
"appId": "appId",
"cloud": "main.js",
"masterKey": "masterKey",
"javascriptKey" : "javascriptKey",
"restAPIKey" : "restAPIKey",
"databaseURI": "mongodb://localhost/test",
"port": 8080
}

parse-dashboard-config.json
{
"apps": [{
"serverURL": "http://localhost:1337/parse",
"appId": "appId",
"masterKey": "masterKey",
"appName": "myappname",
"iconName": ""
}],
"iconsFolder": "icons",
"users":
[
{
"user":"admin",
"pass":"pass"
}
]
}

这有什么问题吗?

最佳答案

您将配置放在错误的位置。

用这个:

docker run -d -p 4040:4040 --name myappname-local-dashboard \
-e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1 \
-e USER1=admin \
-e USER1_PASSWORD=pass \
-v $(pwd)/parse-dashboard-config.json:/src/Parse-Dashboard/parse-dashboard-config.json \
parse-dashboard

另外,我更改了卷的源( $(pwd)/parse-dashboard-config.json)以从当前目录获取配置。

参见 docs

编辑。也许您需要将 apps添加到用户配置中:
{
"apps": [{
"serverURL": "http://localhost:1337/parse",
"appId": "appId",
"masterKey": "masterKey",
"appName": "myappname",
"iconName": ""
}],
"iconsFolder": "icons",
"users":
[
{
"user":"admin",
"pass":"pass",
"apps": [{"appId": "appId"}]
}
]
}

关于docker - 配置用户以远程访问Parse Dashboard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44138218/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com