Setup of a GeoNode project to test the available customizations
This section shows how to setup a GeoNode project called my_geonode
that can be use as playground to test customizations. This setup is meant to be used only for development purposes.
Here are the steps on how to setup this environment
We prepared a my_geonode project that can be cloned and used for our customizations, alternatively it is possible to create a geonode-project from scratch (see geonode-project repository for more info).
Clone the my_geonode
project in your workspace
git clone https://github.com/geosolutions-it/my_geonode -b 4.0.3
Navigate to the cloned repository
cd my_geonode
Create an .env
file for a development environment by running the following command
python create-envfile.py --env_type dev
Replace the GEOSERVER_ADMIN_PASSWORD
variable with the default GeoServer password inside the .env
file
GEOSERVER_ADMIN_USER=admin
- GEOSERVER_ADMIN_PASSWORD=generatedpwd
+ GEOSERVER_ADMIN_PASSWORD=geoserver
Verify that the current src/my_geonode/
folder is a volume of the x-common-django
configuration. This will allow us to change template or static file and see the changes applied on the client on the fly
x-common-django:
&default-common-django
image: ${COMPOSE_PROJECT_NAME}_django:4.0
restart: on-failure
env_file:
- .env
volumes:
+ - './src:/usr/src/my_geonode'
- statics:/mnt/volumes/statics
- geoserver-data-dir:/geoserver_data/data
- backup-restore:/backup_restore
- data:/data
- tmp:/tmp
depends_on:
db:
condition: service_healthy
geoserver:
condition: service_healthy
Check the src/requirements.txt
file and ensure it is pointing to the correct version of GeoNode and geonode-mapstore-client
-e git+https://github.com/GeoNode/geonode-mapstore-client.git@4.0.x#egg=django_geonode_mapstore_client
-e git+https://github.com/GeoNode/geonode.git@4.0.x#egg=GeoNode
Build the docker images with following command
docker-compose build
Run the GeoNode docker container with
docker-compose up -d
Finally we can access to our development instance at
http://localhost/