Docker Compose bundles the three services that make up the ERP Financial Agent — the FastAPI backend, the React frontend served by nginx, and Redis — into a single local environment. All you need is Docker Desktop and a populatedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/yohangr3/agentelanggrafh/llms.txt
Use this file to discover all available pages before exploring further.
.env file to have a fully functional stack running on your machine in minutes.
Prerequisites
- Docker Desktop 4.x or later with the Compose plugin included
- A
.envfile at the project root (see Configuration) - AWS credentials in your environment if you want the Bedrock calls to work locally
Project services
Theinfra/docker/docker-compose.yml file defines three services:
| Service | Image | Internal port | Host port |
|---|---|---|---|
redis | redis:7-alpine | 6379 | 6379 |
app | Built from infra/docker/Dockerfile | 8000 | 8000 |
frontend | Built from frontend/Dockerfile | 80 | 5173 |
app service waits for Redis to pass its redis-cli ping health check before starting. The frontend service in turn waits for app to pass its own health check, so the startup order is always: Redis → Backend → Frontend.
Starting the stack
Clone the repository and create your .env file
Copy
.env.example to .env and fill in at minimum your database credentials and AWS region. The compose file passes the entire .env file to the app service via env_file, and injects REDIS_URL=redis://redis:6379/0 automatically.Build the images
Build both Docker images from their respective Dockerfiles. The backend build uses a two-stage process; the frontend build compiles the Vite bundle before copying it into nginx.
Dockerfile internals
- Backend (infra/docker/Dockerfile)
- Frontend (frontend/Dockerfile)
The backend Dockerfile uses a two-stage build to keep the final image lean.Stage 1 — builder (The container runs as the unprivileged
python:3.12-slim)- Copies
uvfromghcr.io/astral-sh/uv:latest - Installs production dependencies into
.venvviauv sync --no-dev --frozen - Copies
src/and.claude/into the builder layer
python:3.12-slim)- Installs only the minimum system libraries for chart rendering (
libfreetype6,libpng16-16,libfontconfig1,fonts-dejavu-core) - Creates a non-root
agentuser and group - Copies
.venv,src/, and.claude/from the builder stage - Creates
/app/data/faiss_indexfor the vector store
agent user and exposes port 8000. The health check polls GET /health every 30 seconds with a 60-second start period to allow model initialization.Environment variable injection
Theapp service loads your .env file via the env_file directive. Additionally, the compose file injects REDIS_URL to point at the compose network Redis service:
frontend service only needs BACKEND_HOST, which defaults to app (the compose service name):
VITE_API_URL and VITE_WS_URL are compile-time variables baked into the JavaScript bundle. If you change them, you must rebuild the image with docker compose build frontend.Port mappings and volume mounts
| Service | Host → Container | Purpose |
|---|---|---|
redis | 6379 → 6379 | Redis access from the host for debugging |
app | 8000 → 8000 | FastAPI HTTP and WebSocket |
frontend | 5173 → 80 | Nginx serves the React SPA |