Giter Club home page Giter Club logo

docker-mdwiki's Introduction

docker-mdwiki

Lightweight docker image hosting an MDwiki instance with content fetched from a GitHub repository.

About

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.

Build

docker build -t containinger/docker-mdwiki https://github.com/nefarius/docker-mdwiki.git#master

Run

Standalone

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

Compose file

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

Nginx as reverse proxy

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;
  }
}

GitHub Webhook example configuration

Webhook

docker-mdwiki's People

Contributors

nefarius avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.