Skip to content

pyronear/pyro-envdev

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

  • Add this line to /etc/hosts so the MinIO endpoint resolves correctly:

    127.0.0.1 minio
    

🚀 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 (Dash)
  • 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


📂 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

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5