-
Couldn't load subscription status.
- Fork 27
Description
Hi!
I'm working on a few features for ERDDAP and one of them I'd love to support is a method to push a new dataset live without restarting the docker container. ERDDAP supports this via reloading the datasets.xml file with a flag that is set. I was wondering if you would accept a patch that would add a script that can be run via docker exec to trigger a reload of the configuration from docker.d
This script would
- Rebuild the datasets.xml file from datasets.d (including making a backup)
- Validate that the datasets.xml is valid XML (at a minimum, ideally we might integrate the linting tool here?)
- Place the reload flag file in the correct location to trigger a reload of the datasets
Essentially then you can trigger a refresh without rebooting the server with a command like docker exec datasetsd-rebuild. I might also propose a later extension to activate or deactivate a dataset which would be something like docker exec datasetsd-activate DATASET_UUID that would find the <dataset> tag in the datasets.d, update the active flag appropriately and rebuild the datasets for you.
Of note, my use case is that I am hoping to automate generation of dataset tags from our metadata database (efforts are going well so far) and to then automate the push to a staging environment (for testing) and a production environment. Having this staging step mitigates some of the danger of an invalid tag (especially if we integrate the linting tool, but doing a manual deployment of many datasets would be annoying. This command would allow us to deploy these files and load them seamlessly.