Skip to content
Snippets Groups Projects
Commit 2ce90e33 authored by Roang's avatar Roang
Browse files

Merge branch 'fix/postgix-local' into 'develop'

Fix postgis in local setup

See merge request hub/hub!655
parents a587d1a0 010adb52
No related branches found
No related tags found
No related merge requests found
# environment spec
DATABASE_URL=postgresql://hubdbuser:secret@db/hubdb
DATABASE_URL=postgis://hubdbuser:secret@db/hubdb
CLIENT_IP_HEADER=HTTP_X_REAL_IP
#REDIS_URL=
......
......@@ -104,7 +104,7 @@ METRICS_SERVER_IPS = ['127.0.0.1'] # Change this if you want to test the Prome
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'hub',
'USER': 'hub_app',
'PASSWORD': '<kennwort-aus-dem-createuser-aufruf>',
......
......@@ -16,7 +16,7 @@ ALLOWED_HOSTS = ['fully.qualified.domain.name']
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'HOST': '172.17.0.1',
'NAME': 'shinydb',
'USER': 'karlklammer',
......
......@@ -15,5 +15,5 @@ psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$HUB_DB" <<-EOSQL
EOSQL
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$HUB_DB" <<-EOSQL
CREATE EXTENSION postgis
CREATE EXTENSION postgis WITH SCHEMA ${HUB_DB_SCHEMA};
EOSQL
......@@ -15,7 +15,7 @@ services:
environment:
DJANGO_MIGRATE: "yes"
DJANGO_LOAD_FIXTURE: core/fixtures/anhalter.json
DATABASE_URL: "postgresql://${HUB_DB_USER:-hub}:${HUB_DB_PASSWORD:-hub}@${HUB_DB_HOST:-db}:${DB_PORT:-5432}/${HUB_DB:-hub}"
DATABASE_URL: "postgis://${HUB_DB_USER:-hub}:${HUB_DB_PASSWORD:-hub}@${HUB_DB_HOST:-db}:${DB_PORT:-5432}/${HUB_DB:-hub}"
HUB_DB_SCHEMA: "${HUB_SCHEMA:-hubschema}"
CLIENT_IP_HEADER: "HTTP_X_REAL_IP"
NUM_WORKERS: 1
......@@ -30,7 +30,7 @@ services:
restart: "no"
entrypoint: "./manage.py test"
environment:
DATABASE_URL: "postgresql://${HUB_DB_USER:-postgres}:${HUB_DB_PASSWORD:-postgres}@${HUB_DB_HOST:-db}:${DB_PORT:-5432}/${HUB_DB:-postgres}"
DATABASE_URL: "postgis://${HUB_DB_USER:-postgres}:${HUB_DB_PASSWORD:-postgres}@${HUB_DB_HOST:-db}:${DB_PORT:-5432}/${HUB_DB:-postgres}"
HUB_DB_SCHEMA: "${HUB_SCHEMA:-hubschema}"
SSO_SECRET_GENERATE: True
depends_on:
......@@ -48,7 +48,7 @@ services:
network_mode: service:db
db:
image: postgres:latest
image: postgis/postgis:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment