hackoregon / backend-examplar-2018

an example dockerized geo-aware django backend
MIT License
4 stars 5 forks source link

use postgis db engine #80

Open hassanshamim opened 6 years ago

hassanshamim commented 6 years ago

Turns out django_db_geventpool supports postgis driver so just updated the nonstaging information appropriately.

BrianHGrant commented 6 years ago

My main concern with using the gevent based packages was some conflicts with the django dev server that were run into last year. If it works in the dev environment let's use the same driver

MikeTheCanuck commented 6 years ago

I'm not familiar with the details of the drivers - will this support both PostGIS and non-PostGIS targets? e.g. if in the future we deployed a PostgreSQL-only database service, and a separate PostGIS-enabled database service, would apps using this one driver be able to successfully interact with either target?

hassanshamim commented 6 years ago

Mike, We can specify the driver to be used in the database configurations, so if Django were to connect to 2 different databases it could use 2 different drivers. postgis/postgres/sql/mysql doesn't matter.

Brian, I'm happy to change from gevent back to regular postgis. From what I can tell though we only use the gevent based driver in production not dev. Not an ops guy but I assume we don't do any db connection pooling with the dev settings. The gevent based driver should be increasing the performance of our production system.

I have no strong opinions one way or another, just wanted to backport the changes I made when setting up the neighborhood's api based on the exemplar.

BrianHGrant commented 6 years ago

@hassanshamim I would say using the standard postgis in development and the gevent_pooling in prod would work.

bhgrant8 commented 6 years ago

Note: due to issues with gevent_pooling we have gone with the default postgis driver:

'django.contrib.gis.db.backends.postgis'