Open ridoo opened 3 months ago
I found this location where the geoserver-geonode-ext-data.zip
is created. The zip is that one which is downloaded on the geoserver_data
image build:
However, this seems to be a test for pushing things to S3 in the future. I think, the workflow is a similar one on geosolutions Jenkins.
@ridoo I agree with you. The geoserver-data
service is there since a long time and we also considered several times the option to remove it.
Nothing against it, but we want to maintain the data directory as a dedicated volume, that lasts beyond the upgrades of the geoserver
container.
We could make the geoserver
container populate the volume the very first time, and we have to options here:
geoserver.war
and copies the data folder to the volume (NOTICE: the war contains the data directory. It's there in case someone wants to run Geoserver outside the standard deployment, where the data directory is normally mounted in an external folder).geoserver-data
container@giohappy do you see a chance to let the GeoNode/geoserver image provide the geoserver_data dir?
As far as I can see, both options you provided come with some kind of searching, where is the actual source of the data dir. In deployments, I assume, most people do a volume overlay on this directory anyway.
What do you think?
@ridoo as I said in my previous comment, the geoserver
image already ships with a copy of the GeoServer data dir, so we could let it "mount" it inside the volume. See the first bullet point.
At the moment it's inside the WAR file but we could also ship it outside the WAR, ready to be mounted with having to uncompress the WAR first.
BTW do you mean keeping the data-dir inside the container without using external volumes? That could work for "read-only" scenarios, where you have immutable data and configurations.
@giohappy well, what I have in mind is a deployment which configures an empty mountpoint where GeoServer can unpack its data dir into. Always thought, GeoNode needs some specific data dir, so I never checked, if the data dir shipped with geonode/geoserver
is the same as the data dir downloaded.
Regarding separate GeoServer deployment, we could do the following (not tested):
docker compose -f /srv/geonode/docker-compose.yml up -d ## without geoserver
docker run -p8080:8080 -v /srv/geoserver_data:/geoserver_data geonode/geoserver:latest
The /srv/geoserver_data
would be a local directory which can be mounted to both GeoNode and GeoServer.
Hope, I did not miss the actual point your are trying to make.
Currently, the geoserver data directory is downloaded when the
geoserver_data
container is being created:https://github.com/GeoNode/geonode-docker/blob/cf60723caf76a0d7acd1c6fad1304c82a3b28fe8/docker/geoserver_data/Dockerfile#L14-L16
The data dir is a zip hosted at https://artifacts.geonode.org/geoserver/:
https://github.com/GeoNode/geonode-docker/blob/cf60723caf76a0d7acd1c6fad1304c82a3b28fe8/docker/geoserver_data/download.sh#L14-L16
Furthermore, for what I can see, the
geoserver_data
service's only job is to download that zip to provide it as shared volume to be available for other services, like django and geoserver.https://github.com/GeoNode/geonode-docker/blob/cf60723caf76a0d7acd1c6fad1304c82a3b28fe8/docker/geoserver_data/Dockerfile#L25
This however, forces the container to be up and running. Otherwise, the volume is not available anymore.
I have several questions:
geoserver_data
container?geoserver
containergeoserver_data
image completelygeoserver
containerAnything else, I miss?
/cc @mwallschlaeger