MDPAD is a markdown document holder for small scale.
- Running
Redis
server. - Google oauth key (in json format).
- config.json
- Root CA certificates.
We have a running instance installed using docker and hosted at linode. Here are steps we create it.
Create config.json
and put it into ~/mdpad/
along with Google oauth key (here we named it google.json
)
{
"SiteRoot": "https://pad.patrolavia.com/",
"FrontEnd": "/frontend",
"Listen": ":8000",
"DBType": "sqlite3",
"DBConStr": "data.db",
"RedisAddr": "redis:6379",
"SessSecret": "MY-SECReT+NOt/GoIng=t0#L3t@y()U_KnoW",
"SessName": "mdpad",
"GoogleKeyFile": "google.json",
"ValidEditors": "[email protected],[email protected]"
}
MDPAD will use redis to store session data. We prefer running redis in docker.
docker create --name redis redis
docker create --name mdpad -v ~/mdpad:/data -p 8000:8000 --link redis:redis patrolavia/mdpad
We have NGINX running in front of it to provide SSL/SPDY support, so we use port 8000 not 443.
docker start redis mdpad
Start redis first or docker will panic about --link
parameter of mdpad
.
We provide a handy tool docker.sh
helping you create docker image.
docker.sh image_tag_name [/optionally/path/to/sources.list]
# example
docker.sh mdpad
# another example
RUN_TEST=1 docker.sh mdpad /etc/apt/sources.list
# use the image, assume you set `Listen` to ":8000" in config.json
docker run -d -v /path/to/config.json:/data/config.json -p 8000:8000 mdpad
Because Oscar needs NodeJS 0.11/0.12 to build and test, and Darius is written in Go, you have to prepare working environment for Go and NodeJS first.
See Frontend and Backend, or just dig into dockerfile generated by RUN_TEST=1 DRY_RUN=1 docker.sh
.
Any version of GPL, LGPL or MIT.