Overview
DecipherIt provides Docker support for both development and production deployments. This guide covers containerized deployment using Docker Compose.Prerequisites
- Docker Engine 20.10 or higher
- Docker Compose v2.0 or higher
- At least 4GB of available RAM
- 10GB of free disk space
Docker Architecture
The DecipherIt Docker setup includes:- Frontend Container: Next.js application (Node.js 22)
- Backend Container: FastAPI application (Python 3.12)
- PostgreSQL Container: Database server (PostgreSQL 15)
- Qdrant Container: Vector database for semantic search
Docker Compose Configuration
Create adocker-compose.yml file in your project root:
docker-compose.yml
Dockerfile Details
Frontend Dockerfile
The frontend uses a multi-stage build for optimization:Backend Dockerfile
The backend uses Python 3.12 with uv for dependency management:Deployment Steps
Build the Containers
Build all containers using Docker Compose:This will:
- Build the frontend Next.js application
- Build the backend FastAPI application
- Pull PostgreSQL and Qdrant images
Start the Services
Start all services in detached mode:This starts:
- PostgreSQL on port 5432
- Qdrant on port 6333
- Backend API on port 8001
- Frontend on port 3000
Managing the Deployment
View Logs
View logs from all services:Stop Services
Restart Services
Remove Containers
Update the Application
Production Optimization
Resource Limits
Add resource limits to prevent containers from consuming too much memory:Health Checks
Add health checks for automatic recovery:Logging Configuration
Configure log rotation:Use Docker Secrets
For production, use Docker secrets instead of environment variables:Troubleshooting
Container Fails to Start
Check container logs:Database Connection Errors
Verify database is ready:Out of Memory
Increase Docker memory limit in Docker Desktop settings or add resource limits to docker-compose.yml.Port Conflicts
Change port mappings if ports are already in use:Backup and Restore
Backup PostgreSQL Database
Restore PostgreSQL Database
Backup Qdrant Data
Next Steps
Environment Variables
Complete environment variables reference
Configuration
Advanced configuration options