Skip to content

Repository files navigation

Pyronear Dev Environment

This repository provides a Docker Compose configuration to run a full Pyronear development environment with the API, database, S3 emulation, frontend, notebooks, and optional camera engine.


⚙️ Installation

Prerequisites

  • Docker and Docker Compose

Upgrading? The 127.0.0.1 minio hosts entry is no longer needed (S3_PROXY_URL replaces it) — harmless if left in place, but you can remove it.


🚀 Quick Start

Init

make init
make build

Run

make run

🧩 Services

  • pyro-api: Pyronear API (uvicorn)
  • db: PostgreSQL database
  • minio: S3-compatible storage (via MinIO)
  • frontend: Web app (React, pyro-platform)
  • pyro-engine: Engine service (requires cameras, optional)
  • reolinkdev1 / reolinkdev2: Fake Reolink cameras sending test images
  • notebooks: Jupyter server to run helper notebooks
  • db-ui: pgAdmin to browse/manage the database

▶️ Running

Full stack with engine

make build
make run-all

This launches everything including the engine and simulated alerts. You can check health with:

docker logs init
docker logs engine

Partial runs

  • Backend only (API, DB, S3):

    make run-backend
  • Engine only:

    make run-engine
  • Tools only (notebooks, db-ui):

    make run-tools

🔑 Access

  • API: http://localhost:5050/docs

  • Frontend (React app): http://localhost:8080

    • If issues: use a private browser window
    • Admin access currently does not display camera alerts, use user creds from data/csv/users.csv
    • Configuration (API URL, etc.) lives in containers/frontend/app-config.js
  • Notebooks: http://localhost:8889

  • pgAdmin (db-ui): http://localhost:8888/browser/

    • Login: DB_UI_MAIL / DB_UI_PWD (set in .env)
    • First connection: register server with host db, user/password from .env
  • MinIO console (S3 GUI): http://localhost:9001

    • Manage buckets, upload/delete files
  • MinIO S3 API: minio:9000 from the compose network (S3_ENDPOINT_URL), http://localhost:9000 from the host (S3_PROXY_URL, used for presigned image URLs)


📂 Data Usage

Add more images to Reolink Dev

Create a directory data/images before starting the environment and put your images inside.

Send custom alerts

Use Jupyter notebooks (e.g., notebooks/send_real_alerts.ipynb). When running notebooks inside Docker, set:

API_URL = "http://api:5050"

### Update the last image for a camera

1. Upload a new image in MinIO under the bucket ending with `...-alert-api-{organisation_id}`
2. In pgAdmin, update the `cameras` table:

   * `last_image` with the filename
   * `last_active_at` timestamp

🛑 Cleanup

Stop and remove everything:

make stop

About

Deployment and infrastructure management

Resources

Stars

1 star

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages