The open-source platform for managing early wildfire detection
- Docker
- Docker compose
- Poetry
- Make (optional)
The project was designed so that everything runs with Docker orchestration (standalone virtual environment), so you won't need to install any additional libraries.
In order to run the project, you will need to specific some information, which can be done using a .env
file.
This file will have to hold the following information:
API_URL
: URL to the endpoint of Pyronear Alert APIAPI_LOGIN
: your login for the APIAPI_PWD
: your password for the API
Optionally, the following information can be added:
SENTRY_DSN
: the URL of the Sentry project, which monitors back-end errors and report them back.SENTRY_SERVER_NAME
: the server tag to apply to events.DEBUG
: whether the app is in debug or production mode
The file should be placed at the root folder of your local copy of the project.
git clone https://github.com/pyronear/pyro-platform.git && cd pyro-platform
Here, there are several ways to start the service
- Either you have access to a pyronear alert api online through a specific API_URL
- Otherwise, you'll need to create a development environment. Don't panic, here's a tutorial on how to do it smoothly
First copy the example environment setup
cp .env.example .env
Fill it with your API_URL and credentials
make run_dev
Move to a directoty where to clone the pyro-envdev repo, then
git clone https://github.com/pyronear/pyro-envdev.git && cd pyro-envdev
make build
Then, with the following command, you will run the API locally and services that simulate 2 cameras generating alerts
make run-engine
by adding this line in your /etc/hosts
127.0.0.1 www.localstack.com localstack
cd PATH_TO_PYRO-PLATFORM
Fill credentials to access your local API, the example below shall work properly as the API_URL give access to your local pyronear api and (API_LOGIN, API_PWD) are taken from default credentials in the development environment
API_URL='http://host.docker.internal:5050/'
API_LOGIN='github-engine'
API_PWD='passwrd6'
Now, you can run the app container using this command for dev purposes:
make run_dev
or launch your project locally directly with python:
python3 app/index.py
You can now navigate to http://localhost:8050/
to interact with the app.
In order to stop the service, run:
make stop
make run
For production we use docker-compose.yml in which there is the Traefik Reverse Proxy.
Traefik interacts with the Dash frontend app via an external network called web, this needs do be created as follow:
docker network create web
Any sort of contribution is greatly appreciated!
You can find a short guide in CONTRIBUTING
to help grow this project!
Distributed under the Apache 2.0 License. See LICENSE
for more information.