Architecture¶
A trapper-setup localhost deployment brings up the following services. All ports listed are localhost defaults; in production deployments they sit behind Traefik instead.
| Service | What it does | Port |
|---|---|---|
| Trapper Expert (Django) | Core backend, REST API, admin | 8000 |
| Trapper Expert Celery | Background tasks (uploads, AI dispatch) | — |
| Trapper Expert Uploader | Chunked-upload FastAPI service | 8088 |
| Trapper Expert Nginx | Static + media + video streaming | 8080 |
| Trapper AI Manager | Prediction-job orchestration | 8001 |
| AI Worker coordinator | Host process, autodetects hardware | 34821 |
| Citizen Science frontend | Angular SPA | 4200 |
| PostgreSQL (Expert) | TimescaleDB-enabled main database | 5432 |
| PostgreSQL (AI) | Plain PostgreSQL for the AI Manager | 5433 |
| RabbitMQ | Celery broker (Expert and AI Manager) | 5672 |
| Memcached | Shared cache | 11211 |
| Pure-FTPd | FTPS upload endpoint | 21 |
The PostgreSQL Expert image is TimescaleDB-enabled because the ObjectFrameObservation per-frame index is stored as a hypertable, created unconditionally by migration — there's no flag to skip the extension; see Frame hypertable for what's actually on-demand (per-project population, not the extension itself).
Request flow¶
graph TD
Internet --> Traefik
Traefik --> ExpertNginx["Trapper Expert Nginx<br/>(static/media)"]
Traefik --> AINginx["Trapper AI Nginx<br/>(static/media)"]
Traefik --> Frontend["Citizen Science<br/>(Angular)"]
ExpertNginx --> Expert["Trapper Expert<br/>(Django)"]
AINginx --> AIManager["Trapper AI Manager<br/>(Django)"]
Expert --> RabbitMQ
AIManager --> RabbitMQ
RabbitMQ --> ExpertCelery["Trapper Expert Celery"]
RabbitMQ --> AICelery["Trapper AI Celery"]
RabbitMQ --> Coordinator["AI Worker coordinator<br/>(host process, :34821)"]
Expert --> PG1["PostgreSQL<br/>(Expert, TimescaleDB)"]
AIManager --> PG2["PostgreSQL<br/>(AI Manager)"]
The AI Worker coordinator runs on the host (not in a container) so it can autodetect and access GPU/Hailo hardware directly. It is installed and managed independently of the Docker Compose backbone — see Deploy with trapper-setup.
See also¶
- Get a localhost stack running
- Technologies & stack for the framework/library choices behind each service