Skip to content

Docker.D Reload OptionΒ #68

@turnbullerin

Description

@turnbullerin

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

  1. Rebuild the datasets.xml file from datasets.d (including making a backup)
  2. Validate that the datasets.xml is valid XML (at a minimum, ideally we might integrate the linting tool here?)
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions