The SANBI Wildlife Protection System is a platform to track the population levels of endangered wildlife.
The work is funded by the South African National Biodiversity Institute
This project is implemented by Kartoza under contract to IDS.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Read the full license.
Please follow the Kartoza coding standards.
Copy and customize environnment file: Create a copy of the deployment/.template.env
file and name it deployment/.env
. Update the deployment/.env
file with your project-specific settings.
Ensure Dev Containers extension is installed
Build and open project in devcontainer: press Cmd+Shift+P
(macOS) or Ctrl+Shift+P
(Windows/Linux) to open the Command Palette. Type Dev Containers: Rebuild and Reopen in Container
and select it to reopen the folder inside the devcontainer.
Change the permissions of the django_project folder:
chmod -R a+rw django_project
Install dependencies inside the container: Press Cmd+Shift+P
(macOS) or Ctrl+Shift+P
(Windows/Linux), type Tasks: Run Tasks
and select it. Choose React: Install dependencies
to install the necessary dependencies.
Run the migrations inside the container: Press Cmd+Shift+P
(macOS) or Ctrl+Shift+P
(Windows/Linux), type Tasks: Run Tasks
and select it. Choose Django: Migrate
.
Run the project inside the container: Press Cmd+Shift+D
(macOS) or Ctrl+Shift+D
(Windows/Linux), choose Django+React
in the RUN AND DEBUG dropdown.
Review the list of forwarded ports from the container to your local host:
Open your web browser and go to localhost:8000 to view the running application.
The full dump file for layer schema is ~5.3GB, meanwhile compact dump file is only 24MB.
Download Full Dump File for Layer.
Download Compact Dump File for Layer.
Preview for compact dump file:
Copy the dump file to db container. Then run pg_restore from inside db container to restore the dump file.
docker cp sanbi_layer_db_compact.dump deployment-db-1:/home/sanbi_layer_db_compact.dump
docker exec -it deployment-db-1 /bin/bash
cd /home
pg_restore -h 127.0.0.1 -U docker -d django -n layer sanbi_layer_db_compact.dump