Skip to content

Repository files navigation

Red List Evaluation tool

Setup and Usage

Create a .env file in the project root (or set environment variables). Required variables:

  • LAJI_API_ACCESS_TOKEN (optional): API access token for fetching data from laji.fi (later will implement the use of access_token from laji-auth)
  • LAJI_API_BASE_URL (optional): Base URL for laji.fi API (default: https://api.laji.fi/warehouse/private-query/unit/list)
  • MML_API_KEY (optional): Maanmittauslaitos API key used by the server tile-proxy for taustakartta and maastokartta. Get one: https://omatili.maanmittauslaitos.fi/user/profile
  • TARGET (required for login flow): target (system identifier) parameter sent to laji-auth login
  • LAJIAUTH_URL (optional): base URL for laji-auth (default: https://fmnh-ws-test-24.it.helsinki.fi/laji-auth/)
  • SECRET_KEY (required): Flask secret key used to sign sessions
  • SECRET_TIMEOUT_PERIOD (optional): request timeout seconds when contacting laji-auth (default: 10)

The application will load variables from .env automatically. Do not commit secrets.

The app uses PostgreSQL/PostGIS for data storage. Use docker-compose to run both the database and web app:

chmod +x docker-entrypoint.sh
docker-compose up --build

On first start the entrypoint automatically:

  1. Creates all tables
  2. Seeds species from static/resources/species_and_groups.tsv (includes IUCN 2019 categories)
  3. Generates the Finland base grid

All steps are idempotent — safe to run multiple times.

Access the app at http://localhost:5000/simple

To stop:

docker-compose down

To remove all data (including database):

docker-compose down -v

About

Tool for red list evaluations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages