Skip to content

dbca-wa/boranga

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7,490 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boranga

This project is to consolidate threatened species and communities’ data into a modern system application platform, as the existing system and associated legacy data platforms are in formats no longer supported by OIM.

Stack:

  • Ubuntu
  • Postgres (PostGIS)
  • Python / Django
  • Node / Vite / Vue 3

Install and Configure Ledger

Boranga requires ledger to be set up and running first.

See: https://github.com/dbca-wa/ledger for instructions.

Install Boranga Project

git clone https://github.com/dbca-wa/boranga.git
cd boranga

Create and activate a virtual environment if required

pip install -r requirements.txt

Database Migration

See [Migration Steps](migration_steps.md)

Create and Populate the .env File

Required

DEBUG=True
DATABASE_URL="postgis://<username>:<password>@localhost:5432/boranga_dev"
LEDGER_DATABASE_URL='postgis://<username>:<password>@localhost:5432/das_dev'
LEDGER_API_URL="http://localhost:8000"
LEDGER_API_KEY="<ledger_api_key>"
SITE_PREFIX='boranga-dev'
SITE_DOMAIN='dbca.wa.gov.au'
BASE_URL='http://localhost:<port>'
SECRET_KEY='SECRET_KEY_YO'
PRODUCTION_EMAIL=False
NON_PROD_EMAIL='<your_email>'
NOTIFICATION_EMAIL='<email1>,<email2>'
EMAIL_INSTANCE='DEV'
EMAIL_HOST='<email_host>'
NOMOS_BLOB_URL="https://stproponentdata.blob.core.windows.net/public-downloads/taxonomy/species_taxo_export_current.json"

Commonly set for local development

ALLOWED_HOSTS='["*"]'
CONSOLE_EMAIL_BACKEND=True
DEFAULT_FROM_EMAIL='no-reply@dbca.wa.gov.au'
EMAIL_DELIVERY='on'
ENABLE_DJANGO_LOGIN=True
LOG_CONSOLE_LEVEL='DEBUG'
SECURE_CROSS_ORIGIN_OPENER_POLICY=None
SHOW_DEBUG_TOOLBAR=False
SILENCE_SYSTEM_CHECKS=False
SITE_SUBDOMAIN_INTERNAL_SUFFIX=None
OCR_BULK_IMPORT_PROCESS_TASKS_IMMEDIATELY=True  # Never set True in production

Spatial / mapping

GIS_SERVER_URL="https://kaartdijin-boodja-geoserver.dbca.wa.gov.au/geoserver/ows"
DEFAULT_SRID=7844  # GDA2020; also common: 4326 (WGS84), 4283 (GDA94). WARNING: changing this requires a supporting data migration and code changes - do not change without the corresponding code being deployed first.
KB_CADASTRE_LAYER_URL="<url>"
KB_AUTH_USER="<user>"
KB_AUTH_PASS="<password>"

Data verification

DATA_VERIFICATION_READ_ONLY=False  # Set True to make the system read-only during a data verification exercise

# Lock legacy sources after their migration runs are approved to prevent accidental re-migration in production
MIGRATED_LOCKED_TPFL=True
MIGRATED_LOCKED_TEC=True
MIGRATED_LOCKED_TFAUNA=True

Production / deployment

USE_X_FORWARDED_HOST=True
CSRF_TRUSTED_ORIGINS='https://boranga.dbca.wa.gov.au'
SENTRY_DSN="<sentry_dsn>"
OCR_BULK_IMPORT_TASK_TIMEOUT_SECONDS=28800  # Default 8 hours; increase for very large imports

NOTE: The LEDGER_API_KEY can be generated by adding a new api entry in the api app via ledger's django admin

https://<ledger_url>/admin/api/

Build the Front End

cd boranga/frontend/boranga

Create and activate a virtual environment if required

npm install
npm run build

Collect Static

./manage.py collectstatic

Run Front End Dev Server

npm run dev

Run the Django Server

./manage.py runserver <UNUSED_PORT>

About

Boranga System

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors