Deployment Guide - MkDocs Documentation¶
This guide explains how to deploy and manage the Ta-SIEMPlus documentation site.
🚀 Quick Start¶
Local Development¶
-
Install dependencies:
-
Serve locally:
Site will be available at http://localhost:8000 -
Build static site:
Output will be insite/directory
Docker Deployment¶
Using Docker Compose (Recommended)¶
-
Build and start:
-
Access the site:
- URL: http://localhost:8080
-
Health check: http://localhost:8080/health
-
View logs:
-
Stop:
Using Docker directly¶
-
Build image:
-
Run container:
-
Stop and remove:
📚 Versioning with Mike¶
Mike is used to manage documentation versions for different Wazuh releases.
Deploy a Version¶
# Deploy version 4.12 and set as latest
mike deploy 4.12 latest --update-aliases
# Deploy version 4.11
mike deploy 4.11
# Deploy and push to gh-pages branch (for GitHub Pages)
mike deploy 4.12 latest --push --update-aliases
Set Default Version¶
List Versions¶
Delete a Version¶
Serve Versioned Docs Locally¶
🔧 Configuration¶
Site Settings¶
Edit mkdocs.yml to configure:
- Site name and description
- Theme settings (colors, fonts, features)
- Navigation structure
- Plugins and extensions
Navigation¶
The navigation is defined in mkdocs.yml under the nav key:
To add a new page:
1. Create the markdown file
2. Add it to the navigation in mkdocs.yml
3. Rebuild the site
Theme Customization¶
Colors¶
Edit mkdocs.yml:
theme:
palette:
primary: indigo # Change to: red, pink, purple, etc.
accent: indigo # Change to match primary
Features¶
Enable/disable features in mkdocs.yml:
theme:
features:
- navigation.tabs # Top-level tabs
- navigation.sections # Section headers
- search.suggest # Search suggestions
- content.code.copy # Copy code button
Custom CSS and JavaScript¶
Add custom styles in docs/stylesheets/extra.css
Add custom scripts in docs/javascripts/extra.js
These are automatically included via mkdocs.yml.
🌐 Production Deployment¶
GitHub Pages¶
- Enable GitHub Pages in repository settings
- Deploy with mike:
Custom Server¶
-
Build the site:
-
Copy
site/directory to your web server: -
Configure Nginx (already included in
nginx.conf)
Container Registry¶
-
Tag image:
-
Push to registry:
-
Deploy on server:
🔄 Update Workflow¶
When Content Changes¶
- Edit markdown files in appropriate directory
- Test locally:
- Commit and push to repository
- Rebuild Docker image (if using Docker):
When Adding New Runbook/Checklist¶
- Create the markdown file in appropriate directory
- Update navigation in
mkdocs.yml - Add to index page of the section
- Test locally to verify links
- Commit and push
For New Wazuh Version¶
-
Create version directory:
-
Create version content:
-
Update content for new version
-
Add to navigation in
mkdocs.yml -
Deploy version:
📊 Monitoring¶
Health Checks¶
The Nginx configuration includes a health endpoint:
Docker Health¶
Logs¶
# Docker Compose
docker-compose logs -f docs
# Docker
docker logs -f ta-siemplus-docs
# Nginx access log
docker exec ta-siemplus-docs tail -f /var/log/nginx/access.log
# Nginx error log
docker exec ta-siemplus-docs tail -f /var/log/nginx/error.log
🔐 Security Considerations¶
Content Security¶
- Never commit secrets to documentation
- Use vault references:
vault://path/to/secret - Review all PRs before merging
Container Security¶
- Use official base images
- Keep dependencies updated
- Run containers as non-root (Nginx already does this)
- Use read-only filesystem where possible
Network Security¶
- Use HTTPS in production (add SSL termination)
- Configure firewall rules
- Consider authentication if needed (use reverse proxy)
🛠️ Troubleshooting¶
Build Errors¶
Docker Issues¶
# Rebuild without cache
docker-compose build --no-cache
# Check container logs
docker-compose logs docs
# Restart container
docker-compose restart docs
Navigation Not Updating¶
- Check
mkdocs.ymlsyntax - Verify file paths are correct
- Clear browser cache
- Rebuild site
Mike Version Issues¶
# List deployed versions
mike list
# Rebuild specific version
mike deploy 4.12 --update-aliases
# Force delete and redeploy
mike delete 4.12
mike deploy 4.12 latest
📝 Best Practices¶
Content¶
- Use meaningful commit messages
- Test all links before committing
- Follow markdown style guide
- Keep content up to date
Versioning¶
- Deploy new version for major Wazuh releases
- Keep at least 2 previous versions
- Archive very old versions
Performance¶
- Optimize images before adding
- Use lazy loading for large pages
- Monitor site size and build time
Maintenance¶
- Review and update quarterly
- Check for broken links monthly
- Update dependencies regularly
- Monitor for security updates