Skip to main content

Docker Configuration

Nenyax uses Docker Compose to orchestrate all services.

Two Modes

ModeCommandWhat runs in Docker
Local devdocker compose up -d postgres minioOnly DB + MinIO. You run backend/frontend/agent locally.
All-Dockerdocker compose up -d --buildAll 5 services in Docker.

Services

services:
  postgres:       # PostgreSQL 16 — port 5434 (host) → 5432 (container)
  minio:          # MinIO object storage — port 9002 (host) → 9000 (container)
  backend:        # FastAPI — port 4201 (depends on postgres)
  agent:          # LiveKit agent (depends on backend)
  frontend:       # Next.js — port 4200 (depends on backend)

Networking

Local dev — services connect to Docker containers via host ports:
From → ToURL
Backend → PostgreSQLlocalhost:5434
Backend → MinIOlocalhost:9002
Frontend → Backendlocalhost:8000
Frontend → PostgreSQLlocalhost:5434 (Better Auth)
All-Docker — services communicate on the internal Docker network:
From → ToURL
Backend → PostgreSQLpostgres:5432
Backend → MinIOminio:9000
Frontend (server) → Backendhttp://backend:8000/api
Frontend (client) → Backendhttp://localhost:4201/api
Agent → Backendhttp://backend:8000/api
In all-Docker mode, the frontend uses two different API URLs:
  • INTERNAL_API_URL (http://backend:8000/api) — used by server components inside Docker
  • NEXT_PUBLIC_API_URL (http://localhost:4201/api) — used by client components in the browser
Do not remove INTERNAL_API_URL from docker-compose.yml — server components cannot reach localhost:4201 from inside the container.

Environment

No .env file is required for local dev or Docker dev. All compose files have defaults:
  • POSTGRES_PASSWORD defaults to nenyax
  • MINIO_ROOT_USER/PASSWORD defaults to minioadmin
  • BETTER_AUTH_SECRET defaults to authsecret123
Create a root .env only to override these (e.g., for production credentials).

Commands

# Local dev — only infrastructure
docker compose up -d postgres minio

# All-Docker — all services
docker compose up -d --build

# View logs
docker compose logs -f

# View logs for one service
docker compose logs -f backend

# Stop all services
docker compose down

# Stop and reset all data
docker compose down -v

# Rebuild one service
docker compose up -d --build backend