-
Notifications
You must be signed in to change notification settings - Fork 10
Issue with mkdocs documentation #43
Description
Description
I followed the documentation to set up MkDocs using the docker-compose.yml example provided on the site.
However, the container repeatedly crashes and restarts.
Cause
According to the current instructions, the project root is mounted directly to /docs inside the container.
Upon testing, I found that MkDocs expects the following directory structure:
mkdocs/
├── docker-compose.yml
└── mkdocs-data
├── docs
│ └── index.md
└── mkdocs.yml
The mounted directory must contain both the mkdocs.yml configuration file and the docs/ folder.
Mounting only the root directory (as currently suggested) prevents MkDocs from finding its configuration file, causing the container to fail.
Proposed Fix
In the docker-compose.yml, update the volume mapping to point to the mkdocs-data directory instead of the project root:
version: '3'
services:
mkdocs:
image: squidfunk/mkdocs-material
ports:
- "9090:8000"
volumes:
- ./mkdocs-data:/docs
restart: unless-stopped