Add django gis extension
This commit is contained in:
parent
68b1d80ffa
commit
6dfa65ee77
2 changed files with 12 additions and 1 deletions
|
@ -6,6 +6,16 @@ ENV DJANGO_SUPERUSER_PASSWORD=admin
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apt update && \
|
||||||
|
apt install -y --no-install-recommends \
|
||||||
|
gdal-bin \
|
||||||
|
libxml2 libxml2-dev gettext \
|
||||||
|
libxslt1-dev libjpeg-dev libpng-dev libpq-dev libgdal-dev \
|
||||||
|
software-properties-common g++ \
|
||||||
|
zlib1g-dev libgeos-dev libproj-dev \
|
||||||
|
sqlite3 spatialite-bin libsqlite3-mod-spatialite && \
|
||||||
|
apt clean
|
||||||
|
|
||||||
COPY ./requirements.txt /app/requirements.txt
|
COPY ./requirements.txt /app/requirements.txt
|
||||||
|
|
||||||
RUN pip install -U --no-cache-dir -r requirements.txt
|
RUN pip install -U --no-cache-dir -r requirements.txt
|
||||||
|
|
|
@ -37,6 +37,7 @@ INSTALLED_APPS = [
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
'django.contrib.gis',
|
||||||
|
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'corsheaders',
|
'corsheaders',
|
||||||
|
@ -81,7 +82,7 @@ WSGI_APPLICATION = 'right_tree.wsgi.application'
|
||||||
|
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.postgresql',
|
'ENGINE': 'django.contrib.gis.db.backends.postgis',
|
||||||
'NAME': 'right_tree',
|
'NAME': 'right_tree',
|
||||||
'USER': 'postgres',
|
'USER': 'postgres',
|
||||||
'PASSWORD': 'postgres',
|
'PASSWORD': 'postgres',
|
||||||
|
|
Loading…
Reference in a new issue