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
Boranga requires ledger to be set up and running first.
See: https://github.com/dbca-wa/ledger for instructions.
git clone https://github.com/dbca-wa/boranga.git
cd boranga
Create and activate a virtual environment if required
pip install -r requirements.txt
See [Migration Steps](migration_steps.md)
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"
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
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_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
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/
cd boranga/frontend/boranga
Create and activate a virtual environment if required
npm install
npm run build
./manage.py collectstatic
npm run dev
./manage.py runserver <UNUSED_PORT>