Skip to content

Commit

Permalink
Fixing geonode migrations during build
Browse files Browse the repository at this point in the history
  • Loading branch information
kalxas committed Jun 21, 2017
1 parent c5327d3 commit b9f7768
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions app-conf/geonode/local_settings.py.sample
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ SITEURL = "http://geonode/"

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'geonode_app',
'USER': 'user',
'PASSWORD': 'user',
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'geonode_app',
'USER': 'user',
'PASSWORD': 'user',
'HOST' : 'localhost',
'PORT' : '5432',
},
# vector datastore for uploads
'datastore' : {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
#'ENGINE': '', # Empty ENGINE name disables
'NAME': 'geonode_data',
'USER' : 'user',
'PASSWORD' : 'user',
Expand Down
8 changes: 4 additions & 4 deletions bin/install_geonode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ echo "Done"

echo "Copying settings files"
#Replace local_settings.py
sudo cp -f "$USER_HOME/gisvm/app-conf/geonode/local_settings.py.sample" \
sudo cp -f "$BUILD_DIR/../app-conf/geonode/local_settings.py.sample" \
"$GEONODE_DIR/local_settings.py"
sudo cp -f "$USER_HOME/gisvm/app-conf/geonode/sample_admin.json" \
sudo cp -f "$BUILD_DIR/../app-conf/geonode/sample_admin.json" \
"$GEONODE_DIR/base/fixtures/sample_admin.json"

#Change GeoServer port in settings.py
Expand All @@ -127,8 +127,8 @@ mkdir -p "$UPLOAD_PATH"
echo "Configuring GeoNode"
# Create tables in the database
django-admin makemigrations --noinput --settings=geonode.settings
django-admin migrate --noinput --settings=geonode.settings
django-admin syncdb --noinput --settings=geonode.settings
sudo -u "$USER_NAME" django-admin migrate --noinput --settings=geonode.settings
sudo -u "$USER_NAME" django-admin syncdb --noinput --settings=geonode.settings

# Insert default data
django-admin loaddata "$GEONODE_DIR/base/fixtures/initial_data.json" --settings=geonode.settings
Expand Down

0 comments on commit b9f7768

Please sign in to comment.