Docker Compose is the recommended way to run the AI Ticket Support System locally and in staging environments. A singleDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/yocxy2/2a/llms.txt
Use this file to discover all available pages before exploring further.
docker-compose up command brings up all four services — PostgreSQL with pgvector, Redis, the Node.js backend, and the React/nginx frontend — with health checks, named volumes, and correct inter-service networking configured automatically.
Prerequisites
- Docker Engine 24+ — verify with
docker --version - Docker Compose v2 — verify with
docker compose version(thedocker composeplugin, or the standalonedocker-composeCLI v2.x) - OpenAI API key — required at runtime; the backend will fail to start AI features without it
Quick start
Create a .env file at the project root
The only value that must be supplied is your OpenAI API key. All other variables (database credentials, ports, Redis host) already have working defaults wired directly into Your
docker-compose.yml..env file should contain at minimum:Start all services
Attached mode (logs stream to your terminal — useful for first-run debugging):Detached mode (services run in the background):
Wait for all health checks to pass
Both All four services should reach Up (healthy) or Up status. The backend also runs
postgres and redis expose health checks. The backend container waits for service_healthy on both before starting. You can monitor progress with:npx prisma generate on startup before the development server comes online — this is normal and takes a few seconds.Access the application
Once all services are running, open your browser:
| Service | URL |
|---|---|
| Frontend (React) | http://localhost |
| Backend API | http://localhost:3001 |
| Admin Dashboard | http://localhost → click Admin Dashboard |
| RAG Visualizer | http://localhost → click RAG Visualizer |
| Knowledge Base Manager | http://localhost → click Knowledge Base |
Services
The following four services are defined indocker-compose.yml:
| Service | Image | Exposed Port | Notes |
|---|---|---|---|
postgres | pgvector/pgvector:pg16 | 5432 | Persistent volume postgres_data; health check: pg_isready -U postgres (interval 10s, retries 5) |
redis | redis:7-alpine | 6379 | Persistent volume redis_data; health check: redis-cli ping (interval 10s, retries 5) |
backend | Built from ./backend/Dockerfile | 3001 | Depends on postgres and redis reaching healthy; runs npx prisma generate && npm run dev on start |
frontend | Built from ./frontend/Dockerfile | 80 | Multi-stage build — React app compiled with Node 18, served by nginx:alpine; depends on backend |
Backend Dockerfile
The backend image is based onnode:18-alpine. It copies package*.json, installs dependencies, copies the full source, runs npx prisma generate at build time, then builds the TypeScript project with npm run build:
Frontend Dockerfile
The frontend uses a two-stage build: Node 18 compiles the React app, then the compiled output is copied into a cleannginx:alpine image for serving:
Volumes
Two named Docker volumes provide data persistence across container restarts and re-creates:| Volume | Mounted in | Path inside container |
|---|---|---|
postgres_data | postgres service | /var/lib/postgresql/data |
redis_data | redis service | /data |
docker-compose down. To remove them and wipe all stored data, use docker-compose down -v (see Useful commands below).
Environment variables in Docker
The backend service receives its configuration via theenvironment block in docker-compose.yml:
DATABASE_URLusespostgres(the Compose service name) as the hostname — Docker’s internal DNS resolves this automatically within the Compose network. Do not uselocalhosthere.REDIS_HOSTis set toredisfor the same reason — inter-service communication uses service names, notlocalhost.OPENAI_API_KEYis interpolated at runtime from your.envfile via the${OPENAI_API_KEY}syntax and is never hard-coded in the Compose file.
backend/.env.example):