Run MkDocs site in Docker and have it automatically synced from the source git repository.
10K+
Build MkDocs site in Docker and have it automatically synced from the source git repository.
This image only builds the site to container's /app/site directory. Use Docker Compose to run nginx web server to host the site.
docker-compose.yml version: '3'
services:
syncer:
image: buvis/mkdocs-git-sync
environment:
- GIT_REPO=https://github.com/buvis/mkdocs-zettelkasten.git
- GIT_BRANCH=main
- UPDATE_INTERVAL=60
volumes:
- ./config/syncer:/app/config
- site:/app/site
nginx:
image: nginx
ports:
- 8000:80
volumes:
- ./config/nginx:/etc/nginx/conf.d
- site:/site
depends_on:
- syncer
volumes:
site:
https://github.com/buvis/container-images/tree/main/apps/mkdocs-git-sync/config to config directorydocker-compose up
This will run two services: syncer built from the Dockerfile in this repository and nginx web server. They share site volume, where syncer outputs the site built by MkDocs and nginx serves it from there.
Once started, navigate to http://127.0.0.1:8000. You will see MkDocs Zettelkasten documentation generated from its repository
/app/config/mkdocs.yml inside the container/app/config/requirements.txt inside the container<username>:<password> or <token_name>:<token>default: main)default: 900)default: INFO)Content type
Image
Digest
sha256:892800fc6…
Size
30.8 MB
Last updated
6 months ago
docker pull buvis/mkdocs-git-sync