Skip to content

Latest commit

 

History

History
100 lines (83 loc) · 2.85 KB

README.md

File metadata and controls

100 lines (83 loc) · 2.85 KB

Kaartdijin Boodja

Kaartdijin Boodja (meaning "Knowledge of Country") is a web application for managing a catalogue of GIS layers and publishing them for the Department of Biodiversity, Conservation and Attractions (DBCA).

Backend

The backend of Kaartdijin Boodja is a Python Django project using Django REST Framework backed by a PostgreSQL database. The backend uses Poetry to manage its dependencies.

Requirements

Development

Installation

To get a standard development environment up and running using Poetry and virtual environments:

# Ensure Poetry is installed
$ poetry --version
Poetry (version 1.2.1)

# Ensure Python 3.10 is currently activated
$ python3 --version
Python 3.10.4

# Create a virtual environment and install dependencies using Poetry
# The dependencies are installed from the `poetry.lock` file, providing
# consistent and reproducible installations across any machine.
$ poetry install

# Remember to enter the virtual environment shell after installation
$ poetry shell

# Check GDAL is installed correctly
$ gdal-config --version
3.3.2

# Install Python GDAL
$ pip install gdal==`gdal-config --version`

Running

To run a development server, use the Django manage.py script:

$ DEBUG=True python3 manage.py runserver

Configuration

The backend requires the following environment variables to be set:

SECRET_KEY=...
DATABASE_URL=...
DEV_APP_BUILD_URL="http://localhost:9072/src/main.ts"
PRODUCTION_EMAIL=False
EMAIL_INSTANCE='DEV'
NON_PROD_EMAIL='nonprodemail@dbca.wa.gov.au'
EMAIL_DELIVERY=on
ENABLE_DJANGO_LOGIN=True  <-- Will enable a login screen for developement purposes, set to false for production

For convenience, these can also be defined in a .env file that will be loaded at runtime.

Requirements

Development

Installation

To install and/or appropriately update packages and their dependencies:

$ npm install

Building

To build the project:

$ npm run build

Development Environment

To run a development server:

$ npm run dev

or to use a different port:

$ PORT=9072 npm run dev

Structure

They are:

  • govapp
    • contains the department base templates, base packages and backend code
  • govapp/frontend
    • Contains node web app frontend code

Prebuilt GDAL wheel files that can be install with pip (alternative solution when pip install gdal doesn't work)

https://girder.github.io/large_image_wheels/