Create a MkDocs template from private repository

This commit is contained in:
2025-07-15 14:21:11 -04:00
commit c4a655dcee
9 changed files with 75 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
.dockerignore
.git
.gitignore
python
serve.sh
site
+3
View File
@@ -0,0 +1,3 @@
.env
python/
site/
+14
View File
@@ -0,0 +1,14 @@
FROM python:3 AS builder
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN python -m venv ./python && \
. ./python/bin/activate && \
pip install --upgrade pip && \
pip install --use-pep517 --no-cache-dir -r requirements.txt
COPY . .
RUN . ./python/bin/activate && \
mkdocs build --clean --strict
FROM nginx:stable AS runtime
COPY --from=builder /usr/src/app/site /usr/share/nginx/html
+18
View File
@@ -0,0 +1,18 @@
version: '3.7'
networks:
traefik:
external: true
services:
docs:
image: ${IMAGE:-git.krislamo.org/internal/docs}:${VERSION:-latest}
container_name: ${NAME:-docs}
networks:
- ${NETWORK:-traefik}
labels:
- "traefik.http.routers.${ROUTER:-docs}.rule=Host(`${HOSTNAME:-docs.local.krislamo.org}`)"
- "traefik.http.routers.${ROUTER:-docs}.entrypoints=web"
- "traefik.http.services.${ROUTER:-docs}.loadbalancer.server.port=80"
- "traefik.docker.network=traefik"
- "traefik.enable=true"
+3
View File
@@ -0,0 +1,3 @@
# Welcome
Hello, world!
+23
View File
@@ -0,0 +1,23 @@
site_name: Example Docs
site_author: Example Org
copyright: Copyright © 2025 Kris Lamoureux
theme:
name: material
palette:
primary: black
icon:
logo: material/server
extra:
generator: false
social:
- icon: fontawesome/brands/git
link: https:/git.krislamo.org/kris
- icon: fontawesome/brands/docker
link: https://hub.docker.com/u/krislamo
- icon: fontawesome/brands/github
link: https://github.com/krislamo
nav:
- Home: 'index.md'
View File
+1
View File
@@ -0,0 +1 @@
mkdocs-material==9.6.15
Executable
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
[ ! -d "./python" ] && python3 -m venv ./python
# shellcheck disable=SC1091
. ./python/bin/activate
pip install -r requirements.txt
mkdocs serve
deactivate