Skip to content
This repository was archived by the owner on Jul 30, 2018. It is now read-only.
This repository was archived by the owner on Jul 30, 2018. It is now read-only.

Allow just the files and directories that need to survive a docker restart to be mounted for easy upgrade #12

Description

@JorritSalverda

I mount the following paths when running gocd-server as a docker container

/var/log/go-server
/var/lib/go-server/pipelines/flyweight
/var/lib/go-server/plugins
/var/lib/go-server/artifacts
/var/lib/go-server/db
/etc/go
/var/go/.ssh

To be able to kill and restart the docker container without losing database and configuration and not having to check out all flyweights again.

The first time the docker container runs it creates files in the host directories these volumes are mounted to and it skips it the next time, so they're not overwritten. So that works fine. But it's in the way of doing a quick update from one to the next version by just running a newer docker image.

For example I'd rather just mount /var/lib/go-server/db/h2db instead of /var/lib/go-server/db, but then all the other directories in /var/lib/go-server/db/ aren't created and Go doesn't start properly.

And when mounting the whole /var/lib/go-server/db/ directory as I do now it will not update to the latest h2deltas when running a newer image.

All in all there seems to be quite some work around making the docker image easy to use for upgrading versions and for controlling the full configuration through environment variables.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions