Skip to main content
Docker Compose is the recommended way to run OTAS locally or in a staging environment. Each service ships with a docker-compose-local.yml file that starts the Django application together with its own PostgreSQL 16 database and Redis 7 instance. UASAM and Brain use separate databases on different host ports to avoid conflicts, so both stacks can run simultaneously on the same machine.
Brain verifies every incoming log request by calling UASAM’s auth endpoint. Start UASAM first and confirm it is healthy before starting Brain, or Brain’s auth middleware will fail with 503 auth_service_error.

Starting the services

1

Start UASAM

UASAM manages users, projects, agents, and all key issuance. Its Compose stack starts Django on port 8000, PostgreSQL 16 on port 5432, and Redis 7 on port 6379.
cd backend/uasam/docker-compose
docker-compose -f docker-compose-local.yml up
Wait until the log output shows Starting development server at http://0.0.0.0:8000/ before moving to the next step. The stack runs makemigrations and migrate automatically on first boot.
2

Start Brain

Brain captures events and serves analytics. Its Compose stack starts Django on port 8002, PostgreSQL 16 on port 5433, Redis 7 on port 6378, and two Celery processes (worker and beat) for async event processing.
cd backend/brain/docker-compose
docker-compose -f docker-compose-local.yml up
Brain’s Django container maps internal port 8000 to host port 8002 — this is by design so both stacks can share the same internal port convention without conflicting on the host.
3

Start the frontend

The React dashboard is not included in the backend Compose stacks. Run it with npm for the full hot-reload development experience:
cd frontend/otas-frontend
npm install
npm run dev
Alternatively, use the frontend’s own Compose file, which builds the production image and serves it on port 3000:
cd frontend/docker-compose
docker-compose -f docker-compose-local.yml up
The Vite dev server is available at http://localhost:5173; the Docker build at http://localhost:3000.

What each Compose stack includes

UASAM stack

  • uasam-backend — Django 5.0 on port 8000, auto-migrates on start
  • uasam-db — PostgreSQL 16 on host port 5432
  • uasam-redis — Redis 7 on host port 6379

Brain stack

  • brain-backend — Django 5.0 on port 8002, auto-migrates on start
  • brain-celery — Celery worker for async event processing
  • brain-celery-beat — Celery beat scheduler
  • brain-db — PostgreSQL 16 on host port 5433
  • brain-redis — Redis 7 on host port 6378
UASAM Postgres runs on host port 5432 and Brain Postgres runs on host port 5433. The different host ports prevent conflicts when both stacks run simultaneously on the same machine.

Stopping and cleaning up

Press Ctrl+C in the terminal running each stack to stop the containers. To remove containers and their volumes completely:
docker-compose -f docker-compose-local.yml down -v
Run this in each service directory (backend/uasam/docker-compose and backend/brain/docker-compose) separately. The -v flag removes the named volumes, which erases all stored data — omit it if you want to preserve the database across restarts.

Build docs developers (and LLMs) love