Community driven delivery platform for the ones who need it the most
Thinking of building a contact-tracing application? Here's what you can do instead.
-
Install PostgreSQL and PostGIS I highly recommend a Docker installation:
- Install Docker
- Download and run the official PosgreSQL/PostGIS docker image
Alternatively, you can perform an installation directly on the host operating system:
-
Install
python3.7
andpip3
-
Install GDAL (Required for Django to interface with PostGIS)
sudo apt-get install libpq-dev python-dev
sudo apt-get install binutils libproj-dev gdal-bin
-
Create a python virtual environment using
venv
python -m venv ~/python-virtual-environments/kartpool
-
Activate virtual environment
source ~/python-virtual-environments/kartpool/bin/activate
-
Install Django and other dependencies
pip install -r requirements.text
-
Start PostgreSQL database service If you installed via docker, run
docker run --name kartpool-postgis -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgis/postgis
-
Start Django web server (Make sure the virtual environment is activated)
python manage.py runserver
-
Follow the tutorial!
- SSH into your Postgres docker container:
docker exec --user postgres -it kartpool-postgis /bin/bash
(Skip this step if you have a native PostgreSQL installation) - Run
psql
on the terminal
Once you connect to the database, enable the PostGIS extension by typing enable extension postgis
I've had much help from this excellent tutorial
Say hi đź‘‹ on: