diff --git a/deployment/.env b/deployment/.env index a415b2c..c5a700e 100644 --- a/deployment/.env +++ b/deployment/.env @@ -247,8 +247,9 @@ SFTP_FOLDER=/home/web/statics/sftp/ PYTHONPATH=/home/web/django_project:/geonode USE_DEFAULT_GEOSERVER_STYLE=False INITIAL_FIXTURES=True +GROUNDWATER_DATABASE_URL=postgis://geonode:geonode@db:5432/groundwater -VERSION=4.7.1 +VERSION=4.8.0 ISTSOS_VERSION=2.4.1-6 # ------ GEOSERVER ------ diff --git a/django_project/core/settings/base.py b/django_project/core/settings/base.py index d0b1100..4eac625 100644 --- a/django_project/core/settings/base.py +++ b/django_project/core/settings/base.py @@ -126,12 +126,20 @@ ] # -- END Settings for Wagtail -# gwml2 database conf +# -- gwml2 database conf gwml2_database_conf = copy.copy(DATABASES['default']) gwml2_database_conf['NAME'] = 'groundwater' - GWML2_DATABASE_CONFIG = 'gwml2' + +GROUNDWATER_DATABASE_URL = os.getenv("GROUNDWATER_DATABASE_URL", None) +if GROUNDWATER_DATABASE_URL: + _db_conf = dj_database_url.parse( + GROUNDWATER_DATABASE_URL, conn_max_age=GEONODE_DB_CONN_MAX_AGE + ) + gwml2_database_conf.update(_db_conf) DATABASES[GWML2_DATABASE_CONFIG] = gwml2_database_conf +# -- + DATABASE_ROUTERS = ['gwml2.router.GWML2Router'] ROOT_URLCONF = 'core.urls' diff --git a/django_project/core/settings/dev.py b/django_project/core/settings/dev.py index ca0b408..4b40b38 100644 --- a/django_project/core/settings/dev.py +++ b/django_project/core/settings/dev.py @@ -1,28 +1 @@ from .base import * # noqa - -DATABASES = { - 'default': { - 'NAME': 'geonode', - 'USER': 'geonode', - 'PASSWORD': 'geonode', - 'HOST': 'db', - 'PORT': 5432, - 'CONN_MAX_AGE': 5, - 'ENGINE': 'django.contrib.gis.db.backends.postgis'}, - 'datastore': { - 'NAME': 'geonode_data', - 'USER': 'geonode_data', - 'PASSWORD': 'geonode', - 'HOST': 'db', - 'PORT': 5432, - 'CONN_MAX_AGE': 5, - 'ENGINE': 'django.contrib.gis.db.backends.postgis'}, - 'gwml2': { - 'NAME': 'groundwater', - 'USER': 'geonode', - 'PASSWORD': 'geonode', - 'HOST': 'db', - 'PORT': 5432, - 'CONN_MAX_AGE': 5, - 'ENGINE': 'django.contrib.gis.db.backends.postgis'} -} diff --git a/django_project/version/version.txt b/django_project/version/version.txt index cfacfe4..6ca6df1 100644 --- a/django_project/version/version.txt +++ b/django_project/version/version.txt @@ -1 +1 @@ -4.7.1 \ No newline at end of file +4.8.0 \ No newline at end of file