Lightweight docker image hosting an MDwiki instance with content fetched from a GitHub repository.
docker-mdwiki
is a simple and light container based on the Linux Alpine image. Upon startup it clones a specified GitHub repositository and serves its content with devd. Additionally it listens for an incoming Github Webhook and automatically pulls changes upon receiving a push notification. Webhooks are processed by the included webhook server. These services are managed by supervisord. The services themselves run under an unprivileged user.
docker build -t containinger/docker-mdwiki https://github.com/nefarius/docker-mdwiki.git#master
docker run --name=docker-mdwiki \
--restart=always \
-e GIT_CLONE_URL=https://github.com/ViGEm/docs.vigem.org.git \
-e WEBHOOK_ID=4648cc7a-f8aa-4705-90a2-d7958d57d462 \
-e WEBHOOK_SECRET=y9b3nTwR95ejCgNZ \
-p 127.0.0.1:1601:8000 \
-p 127.0.0.1:1602:9000 \
-d containinger/docker-mdwiki:latest
version: "3"
services:
mdwiki:
image: containinger/docker-mdwiki:latest
container_name: mdwiki
environment:
- GIT_CLONE_URL=https://github.com/ViGEm/docs.vigem.org.git
- WEBHOOK_ID=4648cc7a-f8aa-4705-90a2-d7958d57d462
- WEBHOOK_SECRET=y9b3nTwR95ejCgNZ
ports:
- "127.0.0.1:1601:8000"
- "127.0.0.1:1602:9000"
restart: always
This snippet exposes the Wiki at the root of http://example.org
while a push notification can be sent to http://example.org/hooks/4648cc7a-f8aa-4705-90a2-d7958d57d462
(matching the ID referenced in the environment variable).
server {
listen 80;
server_name example.org;
location / {
proxy_pass http://127.0.0.1:1601;
}
location /hooks {
proxy_pass http://127.0.0.1:1602;
}
}