Skip to content

Patrolavia/mdpad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

MDPAD

MDPAD is a markdown document holder for small scale.

Requirements for official backend and frontend

  • Running Redis server.
  • Google oauth key (in json format).
  • config.json
  • Root CA certificates.

Synopsis

We have a running instance installed using docker and hosted at linode. Here are steps we create it.

Prepare configuration files

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]"
}

Create docker containers

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.

Start it

docker start redis mdpad

Start redis first or docker will panic about --link parameter of mdpad.

Installation

Build docker image

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

From source

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.

License

Any version of GPL, LGPL or MIT.

About

Markdown document holder for small scale

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages