启动环境: ubuntu18.04
docker CE 版本: Docker version 18.09.6, build 481bc77
使用 sqlite 数据库
启动命令:
docker run --detach --name pipe --volume ~/pipe.db:/opt/pipe/pipe.db --publish 5897:5897 \
b3log/pipe --sqlite="/opt/pipe/pipe.db" --runtime_mode=prod --port=5897 --server=http://localhost:5897
报错配置
{"log":"D 2019/05/21 12:12:16 confs.go:137: ${home} [/root]\n","stream":"stdout","time":"2019-05-21T04:12:16.49298408Z"}
{"log":"D 2019/05/21 12:12:16 confs.go:155: ${time} [1558411936493094439]\n","stream":"stdout","time":"2019-05-21T04:12:16.49319291Z"}
{"log":"D 2019/05/21 12:12:16 confs.go:190: configurations [\u0026model.Configuration{Server:\"http://localhost:5897\", StaticServer:\"http://localhost:5897\", StaticResourceVersion:\"1557286834435\", LogLevel:\"debug\", ShowSQL:false, SessionSecret:\"jGNkBfxb3s8stBB3Xr0B5Yl2gENoiY36\", SessionMaxAge:86400, RuntimeMode:\"prod\", SQLite:\"/opt/pipe/pipe.db\", MySQL:\"user:password@(localhost:3306)/pipe?charset=utf8mb4\u0026parseTime=True\u0026loc=Local\", Port:\"5897\", AxiosBaseURL:\"/api\", MockServer:\"http://localhost:8888\"}]\n","stream":"stdout","time":"2019-05-21T04:12:16.493427087Z"}
{"log":"I 2019/05/21 12:12:16 markdowns.go:59: [markdown-http] is not available, uses built-in [blackfriday] for markdown processing\n","stream":"stdout","time":"2019-05-21T04:12:16.507458574Z"}
{"log":"D 2019/05/21 12:12:16 themes.go:49: loaded [7] themes\n","stream":"stdout","time":"2019-05-21T04:12:16.511358974Z"}
{"log":"F 2019/05/21 12:12:16 db.go:48: opens database failed: unable to open database file\n","stream":"stdout","time":"2019-05-21T04:12:16.570429242Z"}~~~~
另外还有 readme 中提到,这个-h 是怎么使用,新手刚开始学习,见谅
启动参数说明:
* `--port`:进程监听端口
* `--server`:访问时的链接
完整启动参数的说明可以使用 `-h` 来查看。