Skip to main content

Overview

The Conformly.ai backend can be deployed using Docker Compose, which includes all necessary services: FastAPI backend, Celery workers, Redis, and optional monitoring tools.

Architecture

Quick Start

1. Prerequisites

  • Docker and Docker Compose installed
  • .env file configured in conformly-backend/ directory

2. Environment Setup

cd conformly-backend
cp env.example .env
# Edit .env with your actual values

3. Build and Start Services

docker compose build
docker compose up -d

4. Verify Deployment

# Check service status
docker compose ps

# View logs
docker compose logs -f backend

# Test API health
curl http://localhost:8000/health

Services

Backend API

  • Port: 8000
  • Health Check: http://localhost:8000/health
  • API Docs: http://localhost:8000/docs

Redis

  • Port: 6379
  • Purpose: Message broker and result backend for Celery

Celery Worker

  • Purpose: Execute background analysis tasks
  • Scaling: Run multiple workers: docker compose up -d --scale celery-worker=3

Celery Beat

  • Purpose: Schedule periodic tasks (cleanup, maintenance)

Flower (Optional)

Monitor Celery tasks:
docker compose --profile monitoring up -d
Access at: http://localhost:5555

Production Deployment

For production:
  1. Use environment-specific .env files
  2. Configure proper secrets management
  3. Set up reverse proxy (nginx)
  4. Enable SSL/TLS
  5. Configure database connection pooling
  6. Set up monitoring and logging
  7. Use Docker secrets for sensitive data

Production Deployment Guide

Learn about production deployment best practices