Deployment Guide¶
This document covers deployment options for FastQTools in Docker and production environments.
Docker Deployment¶
Production Environment¶
# Build production image
./scripts/tools/release/deploy --env production --action build
# Run
./scripts/tools/release/deploy --env production --action run
# Or use docker-compose
docker-compose -f docker/docker-compose.yml up -d prod
Development Environment¶
# Run development container
./scripts/tools/release/deploy --env development --action run
# Or use VS Code DevContainer
# Ctrl+Shift+P → "Reopen in Container"
CI/CD¶
# Build + Test
./scripts/tools/release/deploy --env test --action run
# Push to registry
./scripts/tools/release/deploy --action push --registry your-registry.com/fastqtools --tag v3.1.0
Container Images¶
Production Image (docker/Dockerfile.prod)¶
- Base: debian:bookworm-slim
- Size: ~100MB
- Contents: FastQTools binary + runtime libraries
- User: Non-root (fastqtools:1000)
Development Image (docker/Dockerfile.dev)¶
- Base: gcc:15.2-bookworm
- Size: ~2GB
- Contents: Full development toolchain
- User: Non-root (developer:1000)
Volume Mounts¶
Production¶
Development¶
volumes:
- ..:/workspace:cached # Source code
- ~/.conan2:/home/developer/.conan2:cached # Conan cache
- ~/.ccache:/home/developer/.ccache:cached # Build cache
Security¶
Production¶
- Non-root user (UID 1000)
- Minimal base image
- Read-only input volume
- Health check:
fastqtools --help || exit 1
Development¶
- Non-root + sudo
- SSH Agent forwarding (for Git operations)
- Git configuration persistence
Performance Optimization¶
- ccache: Incremental build caching
- Ninja: Parallel builds
- Conan cache: Avoid recompiling dependencies
- Multi-stage builds: Reduce image size
- Release builds:
-O3 -march=native
Health Checks and Logging¶
# Health check
docker exec fastqtools-prod FastQTools --help
# View logs
docker logs fastqtools-prod
docker logs -f fastqtools-prod # Real-time tail
Troubleshooting¶
Permission Denied¶
Missing Libraries¶
Debug Mode¶
Version Updates¶
- Build new version image
- Stop old container
- Start new container with same volumes
- Verify functionality
- Remove old image
Best Practices¶
- Use specific version tags, not
latest - Set CPU/memory resource limits
- Use read-only root filesystem where possible
- Regularly update base images
- Monitor container resource usage