Skip to content

Discord bot that provides information on active wildfires in Portugal.

License

Notifications You must be signed in to change notification settings

dy0gu/firewatcher

Wildfire info with discord! 🔥ℹ️

logo

Firewatcher gets its data from the fogos.pt API and is mostly a simple wrapper around it. Due to the nature of the API, the bot is only able to provide information about wildfires in Portugal.

Usage 🔦

This bot can be added to discord servers through the following link.

Development 🛠️

  • Requirements 📋

  • Setup ⚙️

    • Clone the repository and open a terminal inside it.

    • Install the dependencies:

      # Creating a virtual environment is recommended before installing any project dependencies!
      
      pip install .
  • Create a .env file based on the .env.example file.

    • Start the app:

      python src/bot.py
  • Tooling 🧰

    • Ruff is used as a linter and formatter:

      pip install .[check]
      ruff check --fix
      ruff format
      
      # To automatically lint and format on every commit install the pre-commit hooks:
      pre-commit install
      
      # When using pre-commit hooks, commits may fail if files with errors are checked.
      # Changed files must be added to the staged area and commited again to apply fixes.
      # If you run into any issues just manually run the linter commands above to address them.

Deployment 🚀

The bot is automatically built by a pipeline with every release, so a Docker image is available in the Packages section of the repository. The build images are also published on Docker Hub.

  • Supply the required environment variables when running the container, just like in development.

  • Start the container using the provided docker-compose.yaml:

    # The example compose will try to pull from the registry first, and only builds on fails.
    # To force a build first, simply remove the image key from the service definition.
    
    docker compose up --build --force-recreate --detach --wait --wait-timeout 120
  • Serve it using your server configuration of choice!

About

Discord bot that provides information on active wildfires in Portugal.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •