自己的hackmd自己架 - Codimd

更多会员限定文章可以到patreon观看


Codimd是hackmd的开源版,虽然主要功能仍含hackmd差不多

但并没有提供像是hackmd的团队管理系统

他可以使用heroku, docker compose, k8s来架

Herkou

这是里面最简单的架设方式,点一下heroku的按钮就好

https://heroku.com/deploy?template=https://github.com/hackmdio/codimd/tree/master

Config

会有一些环境变数可以设定,当然也可以deploy完后再去修改

image.png

https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-configuration

::heroku的DB是直接使用plugin,不用去设定CMD_DB_URL::


如果在create app时有遇到错误

Item could not be created:

We couldn't deploy your app because the source code violates the Salesforce Acceptable Use and External-Facing Services Policy.

::先去fork codimd的专案,然后把button和app.json里面的连结改掉::

https://heroku.com/deploy?template=https://github.com/username/codimd/tree/master
{"repository": "https://github.com/username/codimd",}

如果成功create app但是有error

2022-03-23T13:45:56.526766+00:00 app[web.1]: npm ERR! 2022-03-23T13:45:56.526878+00:00 app[web.1]: npm ERR! Failed at the codimd@2.4.1 start script.2022-03-23T13:45:56.527016+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.2022-03-23T13:45:56.530491+00:00 app[web.1]: 2022-03-23T13:45:56.530721+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:2022-03-23T13:45:56.530822+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2022-03-23T13_45_56_527Z-debug.log2022-03-23T13:45:56.725946+00:00 heroku[web.1]: Process exited with status 12022-03-23T13:45:56.816721+00:00 heroku[web.1]: State changed from starting to crashed

一样得fork repo,然后去package.json改node版本

{"engines": {    "node": "12.22.1"  },}

记得deploy里面的github要和fork的repo link起来


关于作者: 网站小编

码农网专注IT技术教程资源分享平台,学习资源下载网站,58码农网包含计算机技术、网站程序源码下载、编程技术论坛、互联网资源下载等产品服务,提供原创、优质、完整内容的专业码农交流分享平台。

热门文章