-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the geoserver container populate the datadir, at runtime #57
Comments
Related: #38 |
hey @giohappy .. had a quick look. Here are my 2cts:
Once done, the default
The volume is created and populated for the first time running the container and available under the host's With this
|
@ridoo I'm not sure I get all your points
the PR already removed the additional docker image and moved the management of the default datadir to the geoserver image. And what do you mean by "keep only those which are relevant to GeoNode"?
This is what it already does with Are you suggesting to keep using Docker volumes (as we have now)? I haven't tested using the driver options of the Docker volume. It could be an alternative to bind mounting I guess. Do you think this would allow to keep populating the image at build time, and have an externally managed volume? |
I mean: get rid of the
I know. But how it is done is unnecessarily complex (as far I can see). What I wanted to say is this: The data dir baked into the image serves as a "good-to-start" default. Running data dir in the container is volatile and will be gone once the container is re-created. You say this:
If the geoserver image contains the content from
Once you have moved the data dir to this directory, you could think to keep only those files which are really relevant to GeoNode. However, this would mean to mount them separately after mounting the whole data dir. This should be done in a later step. |
@ridoo we agree that we could bake the default datadir inside this image, without downloading the artifact generated from The other point of this PR is allowing Docker Bind Mounts. From my tests, if we configure a bind mount inside the Docker compose, which is map a host path to the containr's |
Totally fine for me :)
In my experience, shared-folders (which do not exist yet) will be populated with the content of the container. Imagine a postgresql container which gets a host folder mounted as a shared volume. The database entries will be populated on first use but will be re-used once the container starts again. You can try it out:
I added optional bind mounts to the docker blueprint via an
This can be configured via |
This task want to solve two issues at the same time:
geoserver_data
image and container, whose single purpose is to bake the content of the datadir volumegeoserver
image). If a bind mount is configured inside the Docker Compose configuration, it will be empty, since inside the container it's shadowed by the Docker volume. By moving the copy of datadir content at runtime we ensure that either the internal volume or a bind mounted volume is populated the first time the container is run.The text was updated successfully, but these errors were encountered: