A supervisor for docker-compose apps.
Project description
Harbormaster
Harbormaster is a small utility that lets you easily deploy multiple Docker-Compose applications.
Installation
Installing Harbormaster is simple. You can use pipx
(recommended):
$ pipx install docker-harbormaster
Or pip
(less recommended):
$ pip install docker-harbormaster
You need to also make sure you have git
installed on your system.
Usage
Harbormaster uses a single YAML configuration file that's basically a list of repositories to deploy:
repositories:
myapp:
url: https://github.com/someuser/somerepo.git
otherapp:
url: https://gitlab.com/otheruser/otherrepo.git
Then, just run Harbormaster in the same directory as that configuration file. Harbormaster will parse the file, automatically download the repositories mentioned in it (and keep them up to date).
Harbormaster only ever writes to the working directory you specify, and nowhere
else. All the data for each Compose app is under <workdir>/data/<appname>
, so
you can easily back up the entire data directory in one go.
Handling data directories
Due to the way Compose files work, you need to do some extra work to properly tell Harbormaster about your volumes.
Harbormaster provides two kinds of directories: Data and cache.
Data is anything that you want to keep. Data directories will never be deleted,
if you remove an app later on, its corresponding data directory will be moved
under the archives/
directory and renamed to <appname>-<deletion date>
.
Cache is anything you don't care about. When you remove an app from the config, the cache dir is deleted.
Harbormaster will look for a file called docker-compose.yml
at the root of the
repo, and look for the specific strings {{ HM_DATA_DIR }}
and
{{ HM_CACHE_DIR }}
in it. It will replace those strings with the proper
directories (without trailing slashes), so the volumes
section of your
Compose file in your repository needs to look something like this:
volumes:
- {{ HM_DATA_DIR }}/my_data:/some_data_dir
- {{ HM_DATA_DIR }}/foo:/home/foo
- {{ HM_CACHE_DIR }}/my_cache:/some_cache_dir
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file docker-harbormaster-0.1.2.tar.gz
.
File metadata
- Download URL: docker-harbormaster-0.1.2.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fba35d345496873819558306ec07af65ba1ae2dedeb3ddb28f6a33b3d98f594e |
|
MD5 | 441bd0441a06fc6943655dd566f53575 |
|
BLAKE2b-256 | d75725a907201b53b2ebc894a055eb9944aaff81ea959ba0ec76760fedaf03aa |
File details
Details for the file docker_harbormaster-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: docker_harbormaster-0.1.2-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2acf181e36933a4df0891f14f0d28caeef38a03fcb3d2f0277e463febe0f6685 |
|
MD5 | dd709e31442729246ff3777bd5f44254 |
|
BLAKE2b-256 | b87aa659cf91f3ec0f46ab4168899b84ce9936fd2298bef3824a878d99bc9ad7 |