add documention workflow
This commit is contained in:
30
docs/docker/Dockerfile
Normal file
30
docs/docker/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
||||
# Stage 1: Build the static site using MkDocs
|
||||
FROM python:3.9-slim-buster as builder
|
||||
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the requirements file
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install the Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy the rest of the application files
|
||||
COPY ../.. .
|
||||
|
||||
# Build the MkDocs site
|
||||
RUN mkdocs build
|
||||
|
||||
|
||||
# Stage 2: Serve the static files with Nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy the built site from the builder stage
|
||||
COPY --from=builder /app/site /usr/share/nginx/html
|
||||
|
||||
# Expose port 80 for the web server
|
||||
EXPOSE 80
|
||||
|
||||
# Command to run Nginx in the foreground
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
14
docs/docker/Dockerfile.dev
Normal file
14
docs/docker/Dockerfile.dev
Normal file
@@ -0,0 +1,14 @@
|
||||
# Dockerfile for development with live-reloading
|
||||
FROM python:3.9-slim-buster
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy and install dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Expose the port MkDocs serve will run on
|
||||
EXPOSE 8000
|
||||
|
||||
# Command to run the development server
|
||||
CMD ["mkdocs", "serve", "--dev-addr", "0.0.0.0:8000"]
|
||||
13
docs/docker/docker-compose.yml
Normal file
13
docs/docker/docker-compose.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mkdocs:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
- ../..:/app
|
||||
environment:
|
||||
- GIT_DISCOVERY_ACROSS_FILESYSTEM=1
|
||||
17
docs/docker/requirements.txt
Normal file
17
docs/docker/requirements.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
# ------------------------------------------------------------------
|
||||
# MkDocs runtime dependencies for the docs Docker image
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# Core: theme (provides mkdocs itself as a transitive dep)
|
||||
mkdocs-material==9.7.1
|
||||
|
||||
# pymdownx.* extensions used in mkdocs.yml:
|
||||
# arithmatex, highlight, superfences, tabbed, details, blocks.caption
|
||||
# (also a hard dep of mkdocs-material, pinned here for reproducibility)
|
||||
pymdown-extensions>=10.0
|
||||
|
||||
# Markdown math rendering support (arithmatex generic mode)
|
||||
# JS side is loaded via CDN (polyfill.io + MathJax), no extra Python pkg needed
|
||||
|
||||
# Optional: PDF export plugin (exporter: block, currently commented out in mkdocs.yml)
|
||||
mkdocs-exporter
|
||||
1
docs/docker/runtime.txt
Normal file
1
docs/docker/runtime.txt
Normal file
@@ -0,0 +1 @@
|
||||
3.7
|
||||
Reference in New Issue
Block a user