Docker Notes¶
See: Docker Compose: A Master Guide with Real-Time Examples
Running Multiple Zensical Containers¶
To orchestrate multiple Docker containers running Zensical, the official and recommended approach is to use Docker Compose.
Docker Compose allows you to define and manage multiple Zensical documentation sites or a blended stack (i.e., Zensical sites
combined with a reverse proxy or backend services) using a single docker-compose.yml configuration file.
Multi-Container Setup¶
The official Zensical image exposes port 8000 by default and utilizes /docs as its working directory.
Below is a sample docker-compose.yml structure that runs two distinct Zensical documentation sites simultaneously.
services:
# Container 1: Zensical documentation
zensical:
image: zensical/zensical:latest
container_name: zensical
ports:
- "127.0.0.1:8006:8000"
volumes:
- ./zensical-project:/docs
restart: unless-stopped
# Container 2: Pond-7 documentation
pond-7:
image: zensical/zensical:latest
container_name: pond-7
ports:
- "127.0.0.1:8008:8000"
volumes:
- ./pond-7-project:/docs
restart: unless-stopped
How to Run and Manage the Fleet¶
Ensure you have your documentation directories (e.g., ./zensical-project and
./pond-7-project) mapped correctly on your host machine.
Navigate to the directory containing your docker-compose.yml configuration file and use these essential Docker commands:
- Start all containers in the background:
docker compose up -d - Check the running status and port mappings:
docker compose ps - View the aggregated logs or isolate logs for a single service:
docker compose logs -f api-docs - Stop and remove the multi-container stack:
docker compose down - List Docker images (Image, ID, Disk Usage, Content Size, In Use):
docker images - Show the currently installed version of Zensical:
docker exec -it zensical pip show zensical
ResultName: zensical Version: 0.0.65 Summary: A modern static site generator built by the creators of Material for MkDocs Home-page: https://github.com/zensical/zensical Author: Author-email: Zensical <contributors@zensical.org> License-Expression: MIT Location: /usr/local/lib/python3.14/site-packages Requires: click, deepmerge, jinja2, markdown, pathspec, pygments, pymdown-extensions, pyyaml, tomli Required-by:
Updating Zensical¶
To update the version of Zensical running inside a container:
- Open a
bashterminal in the directory containing thedocker-compose.ymlfile. - Shut down the container.
- Pull the desired version of Zensical from the offical Docker repository.
- Bring the container up again.