NISIRA Assistant ships with two Docker Compose configurations: a development stack backed by MySQL for local experimentation, and a production stack using PostgreSQL with theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/HugoX2003/nisira-assistant/llms.txt
Use this file to discover all available pages before exploring further.
pgvector extension, a dedicated Nginx reverse proxy, and hardened Django settings. Both stacks share the same backend and frontend images, so you build once and promote the same artifact from local to production.
Prerequisites
Before starting, ensure the following tools are installed on your machine or server:- Docker Engine 24.0 or later — Install Docker
- Docker Compose v2 (bundled with Docker Desktop; run
docker compose versionto verify) - Git to clone the repository
Docker Compose v2 uses the
docker compose command (with a space). The legacy docker-compose binary (v1) is no longer maintained. All commands in this guide use the v2 syntax.Development Stack (docker-compose.yml)
The development stack spins up three services: a MySQL 8.0 database, the Django backend on port 8000, and the React frontend served from Nginx on port 3000 → 80.
Services at a glance
| Service | Image / Build | Port mapping |
|---|---|---|
db | mysql:8.0 | 3306:3306 |
backend | ./backend (Dockerfile) | 8000:8000 |
frontend | ./frontend (Dockerfile) | 3000:80 |
Required environment variables
Createbackend/.env before starting. At minimum, set:
Starting the development stack
Build and start all services
--build flag ensures Docker rebuilds the backend and frontend images if any source files have changed. Remove it on subsequent runs for a faster startup.Open the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api/
- Django Admin: http://localhost:8000/api/admin/
Stopping the development stack
Production Stack (docker-compose.production.yml)
The production stack replaces MySQL with PostgreSQL 16 + pgvector, hardens the Django settings module (core.production_settings), and adds an Nginx reverse proxy that routes /api/ requests to the backend and all other traffic to the frontend.
Services at a glance
| Service | Image / Build | Notes |
|---|---|---|
db | pgvector/pgvector:pg16 | Built-in health check via pg_isready |
backend | ./backend (Dockerfile) | Waits for db to be healthy |
frontend | ./frontend (Dockerfile) | Built with REACT_APP_API_URL build arg |
nginx | nginx:1.27-alpine | Binds ports 80 and 443 |
nisira-network bridge network, and the Nginx configuration at ./nginx/nginx.conf is mounted read-only.
Nginx routing summary
Required environment variables
Copy.env.production.example to .env.production and fill in every value:
Deploying the production stack
Root Dockerfile (Backend-Only Build)
The root-levelDockerfile is designed for DigitalOcean App Platform deployments, where the frontend is hosted separately. It builds the backend only from python:3.12-slim, collects static assets, and starts Gunicorn automatically.
The
backend/Dockerfile (used by docker-compose.production.yml) is a multi-stage build that produces a smaller image with a non-root django user and a dedicated entrypoint script. Use that Dockerfile when deploying with Compose.Persistent Volume Mounts
Both Compose files persist the backend’s document store and vector database across container restarts, but they use different volume strategies. Development (docker-compose.yml) — bind mounts:
| Host path | Container path | Purpose |
|---|---|---|
./backend/data | /app/data | Uploaded and processed documents |
./backend/chroma_db | /app/chroma_db | ChromaDB vector store |
docker-compose.production.yml) — named volumes:
| Volume name | Container path | Purpose |
|---|---|---|
rag_data | /app/data | Uploaded and processed documents |
chroma_data | /app/chroma_db | ChromaDB vector store |
Updating the Application
To deploy a new version, pull the latest code and rebuild:Useful Docker Commands
- Logs
- Shell Access
- Resource Usage
- Database Backup