Skip to content

Latest commit

 

History

History
108 lines (71 loc) · 5.12 KB

README.md

File metadata and controls

108 lines (71 loc) · 5.12 KB

Geonode Datapackage Feature Development

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.

Background

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:

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.

Setup Project

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

Configuration

💡 Note

Settings (e.g. geodatabase parameters) are mainly configured in the .env file. To review in-built default settings of an image, run the env command on an image. For example docker 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.

TLS Config

If you want to configure a TLS certificate, you can mount key and cert as pems 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

Volume Configuration

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.

Start and Run

Docker-Compose Basics

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.