This repository assembles a setup to push forward develop of the non-spatial data import feature for GeoNode, a spatial content management system. All needed components are available as Docker images and will be set up and run via the docker compose tool.
The whole setup is based on the Docker Blueprint for a GeoNode Installation. The blueprint is an opnionated GeoNode setup, but helps to keep everything necessary in one place to develop the datapackage feature which adds changes on multiple repositories:
- GeoNodeUserGroup-DE/geonode/ (branch
datapackage_tabular-data
) - GeoNodeUserGroup-DE/geonode-mapstore-client/ (Branch
datapackage_tabular-data
) - https://github.com/GeoNodeUserGroup-DE/geonode-importer/
- https://github.com/GeoNodeUserGroup-DE/importer-datapackage/
Under ./.devcontainer
you find a configuration to run and debug the project as devcontainer
.
The setup integrates nicely with IDEs like vs-code.
For detailed background information about the genesis of the blueprint and how this relates to the actual GeoNode upstream checkout the Background section of the blueprint repository itself.
Make sure you have installed git
, Docker
and docker compose
.
Clone the repository containing a GeoNode Docker setup and change directory your local working copy:
git clone --recurse-submodules https://github.com/GeoNodeUserGroup-DE/geonode-dev-datapackage geonode-dev-datapackage
cd geonode-dev-datapackage
💡 Note
Settings (e.g. geodatabase parameters) are mainly configured in the
.env
file. To review in-built default settings of an image, run theenv
command on an image. For exampledocker run geonode/geoserver env | sort
.For a complete set of available options take the GeoNode Settings documentation as a reference.
The containers get configured during creation via environment variables.
The geonode/settings.py
settings module takes further configuration of the GeoNode containers (django
and celery
) and aligns some names with those documented.
Copy the sample.env
to .env
and make your changes (.env
is not versioned).
For a quick start taking default values you can run docker compose up -d --env-file=sample.env
.
Have a look at the Ways to set environment variables in Compose documentation.
If you want to configure a TLS certificate, you can mount key and cert as pem
s in the geonode
service within the docker-compose.yml
file.
Uncomment the corresponding lines:
volumes:
- nginx-confd:/etc/nginx
- statics:/mnt/volumes/statics
# Link to a custom certificate here
#- <path-to-cert>.pem:/geonode-certificates/autoissued/fullchain.pem
#- <path-to-key>.pem:/geonode-certificates/autoissued/privkey.pem
By default compose creates named volumes on its first start (or in case you stopped using the -v
flag).
The default volume configuration is included from ./compose-volumes_default.yml
.
To configure a different volume setup copy ./compose-volumes_default.yml
to ./compose-volumes_myconfig.yml
.
Now, adjust the volume configuration for each volume:
geoserver-data-dir:
name: ${COMPOSE_PROJECT_NAME}-gsdatadir
driver_opts:
device: /mnt/geonode-volume/geoserver_data
type: none
o: bind
Make sure to have all volume definitions in /compose-volumes_myconfig.yml
.
Define VOLUME=myconfig
as an environment variable and verify your setup via docker compose config | less
.
💡 Hint:
Bind volumes are not created by Docker during startup. Make sure all directories exist or Docker will fail to mount.
If everything looks good start up the services.
Run docker compose up -d
to start all geonode components.
Review all started components by executing docker compose ps
.
You can follow logs via docker compose logs -f
and optionally pass a service to only follow a service's log.
Stop all components via docker compose down
, and pass a -v
flag to clean up all volumes (CAUTION: removes all persisted data).
For more features and available commands, docker compose --help
, or read the docker compose CLI documentation.