eXist-db / docker-existdb

Docker image builder for eXist-db
GNU Affero General Public License v3.0
11 stars 6 forks source link

What to do with configuration files #13

Closed grantmacken closed 6 years ago

grantmacken commented 6 years ago

eXist has various config files in different locations. I don't think we should expect the user to clone this repo, adjust the configs then do a build.

My suggestion is we bundle the configs into a single directory in the image and symlink to original eXist locations.

The config directory could then be a mount volume, so the changes made to a config file would persist beyond stopping and starting the container.

adamretter commented 6 years ago

So at the moment, if I understand correctly, we have copies of the eXist-db config files in this repo. I have always been quite uneasy about that, because it is possible that these could easily become out-of-sync with any future changes to eXist-db.

I would like to see a mechanism that uses the config files from eXist-db and makes the appropriate modifications using Augeas. This is the mechanism I used in the Evolved Binary Docker Images.

I think your idea of making the configs modifiable, and that they can be persisted is a good one. I would like to see the source of the configs come from an eXist-db repo though, rather than maintaining copies separately in this repo.

duncdrum commented 6 years ago

Yes, currently the only docker specific modification is a change to the log4j2 file, see #3 which we could do via Augeas (or some other CLI xml tool). But I m expecting more docker specific changes.

Symlinking and mounting a volume is a great idea, however, i worry about exist ability to access the files during its startup sequence, so we should add a test to make sure that it works.

Alternatively we could run a series of docker cp builder:path-to-conf ./src commands either in a pre-build hook, or on e.g. on Travis.

grantmacken commented 6 years ago

20 config dir created and symlinks created