{"id":19243138,"url":"https://github.com/samtay/dockmaster","last_synced_at":"2025-06-29T17:37:40.752Z","repository":{"id":80754721,"uuid":"73648418","full_name":"samtay/dockmaster","owner":"samtay","description":"yaml loving docker-compose orchestration","archived":false,"fork":false,"pushed_at":"2017-03-16T00:33:27.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-23T14:46:54.344Z","etag":null,"topics":["docker-compose","docker-machine","haskell","orchestration"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samtay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-13T22:56:47.000Z","updated_at":"2020-01-20T02:15:02.000Z","dependencies_parsed_at":"2023-02-28T17:15:41.505Z","dependency_job_id":null,"html_url":"https://github.com/samtay/dockmaster","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/samtay/dockmaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Fdockmaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Fdockmaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Fdockmaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Fdockmaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samtay","download_url":"https://codeload.github.com/samtay/dockmaster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samtay%2Fdockmaster/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262639153,"owners_count":23341433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","docker-machine","haskell","orchestration"],"created_at":"2024-11-09T17:16:48.237Z","updated_at":"2025-06-29T17:37:40.691Z","avatar_url":"https://github.com/samtay.png","language":"Haskell","readme":"# dockmaster [![Build Status](https://travis-ci.org/samtay/dockmaster.svg?branch=master)](https://travis-ci.org/samtay/dockmaster)\nyaml loving docker-compose orchestration\n\n## why?\nDockmaster was built for convenience. Some of these conveniences are:\n\n- **machine management**: with multiple machines and compositions, dockmaster allows us to keep the machine targets for each composition stored in yaml configuration:\n ```yaml\n targets:\n   - name: node-a\n     type: docker-machine\n \n     # optional, defaults to name\n     machine: node-a\n ```\n With the configuration above, `dm` will connect to docker-machine `node-a` when executing any command.\n\n- **hooks**: automate pre \u0026 post hooks around arbitrary `docker-compose` commands:\n ```yaml\n commands:\n   up:\n     pre_hooks:\n       - file: relative_path/to/hook.sh\n       - file: /absolute/path/to/hook.sh\n       - shell: rm -rf .working\n   wiggle:\n     run_compose: false\n     # ^^^ does not call docker-compose between pre- and post- hooks.\n     pre_hooks:\n       - file: wiggle.sh\n ```\n\n- **templating**: avoid carpal tunnel. Template your docker-compose files to reuse common patterns:\n ```yaml\n compose:\n   file:\n     - path: docker-compose.yml\n     - path: docker-compose.j2\n       type: template\n       config:\n         - some.vars\n         - many.env\n ```\n The `files` node will compile `docker-compose.j2` with variables from the `config` files.\n This ends up calling `docker-compose` with successive file arguments, e.g.\n ```bash\n docker-compose -f docker-compose.yml -f docker-compose.j2.yml\n ```\n\n- **global flags**: automate environment variables to be present during command execution:\n ```yaml\n env:\n   files:\n     - \"somefile.env\"\n     - \"somefile.json\"\n     - \"somefile.xml\"\n     - \"somefile.yml\"\n   vars:\n     ROBS_FAVORITE_NUM: \"64\"\n ```\n and flags that should always be passed to `docker-compose`:\n ```yaml\n compose:\n   flags:\n     - \"--project-name aaa\"\n ```\n\n## run dockmaster\n### dependencies\nDockmaster requires the following tools installed on your system at run time:\n\n0. [docker-compose](https://docs.docker.com/compose/install/)\n1. [docker-machine](https://docs.docker.com/machine/install-machine)\n2. [cop](https://github.com/jasmith590/COP)\n\nAlternatively, check out [dex](https://github.com/dockerland/dex) which will allow you to get all of these tools via dex images (docker executables). Dex only requires [docker](https://www.docker.com/) and [git](https://git-scm.com/) and can run pretty much anywhere.\n\n### installation\n\n#### from a release\nDownload a [release](https://github.com/dockerland/dockmaster/releases) and copy it to a folder in your `$PATH`:\n```bash\ncurl -L \"https://raw.githubusercontent.com/dockerland/dockmaster/master/install.sh\" | sudo sh\n```\n\n#### from source\n```bash\ngit clone git@github.com:dockerland/dockmaster.git\ncd dockmaster\nmake\nsudo make install\n```\n\n## usage\nDockmaster provides binaries `dm` and `dmc` which are for interacting with `dockmaster.yml` files and setting config values, respectively.\n#### reference\n```\n$ dm --help\ndm - yaml loving docker compose orchestration\n\nUsage: dm [-c|--composition PATH] [-v|--verbose] [-l|--local] COMMAND [ARGS]\n  Orchestrate your docker-compose\n\nAvailable options:\n  -h,--help                Show this help text\n  -c,--composition PATH    Composition directory. Note this can be relative to\n                           any directories specified in global\n                           config. (default: \".\")\n  -v,--verbose             Verbose output.\n  -l,--local               Execute without connecting to configured docker\n                           machine.\n  COMMAND                  Command to forward to docker-compose.\n  ARGS                     Any arguments/options to forward to docker-compose\n                           COMMAND.\n\n$ dmc --help\ndmc - dockmaster configuration modifiers\n\nUsage: dmc COMMAND\n\nAvailable options:\n  -h,--help                Show this help text\n\nAvailable commands:\n  set                      Set value\n  get                      Get value\n  unshift                  Unshift value (for arrays)\n  push                     Push value (for arrays)\n  shift                    Shift value (for arrays)\n  pop                      Pop value (for arrays)\n  cat                      Cat full configuration\n  ls                       List available config fields\n```\n\n#### `dm --composition` resolution\n```shell\n# executes `docker-compose down` against `dockmaster.yml` in CWD\n$ dm down\n\n# executes `docker-compose up -d` on `./composition`\n$ dm -c composition -- up -d\n\n# executes `docker-compose up -d` on `/absolute/composition`\n$ dm -c /absolute/composition -- up -d\n\n# adds composition listing directory to configuration\n# this makes it easier to issue commands to compositions from anywhere\n$ dmc push PATHS $HOME/git/docker-repo/compositions\nSaved successfully\nThe new value for PATHS is:\n- $HOME/git/docker-repo/compositions\n\n# executes `docker-compose logs` on $HOME/git/docker-repo/compositions/deploybot\n$ dm -c deploybot logs\n```\n\n#### `dm --verbose` information\nUse verbose output for more information. This will provide a playback of all commands issued by `dm`, and also help troubleshoot composition directory resolution:\n```shell\n$ dm -v -c nonexistent up\nLooking in directory nonexistent\nLooking in directory /home/user/path2/nonexistent\nLooking in directory /home/user/path3/nonexistent\nLooking in directory /home/user/otherpath/nonexistent\nCould not resolve dockmaster working directory.\n```\n\n#### `dm --local` to skip machine targets\nThe local flag disregards connecting to any specified docker machines, and just runs `docker-compose` directly. If you are not connected to a docker machine, this will run \"locally\" on your machine; otherwise, it will run on the currently configured docker machine. (Use `docker-machine active` to test if you are connected to an external machine or not.)\n```shell\n# get log output from node-b\n$ dm -c runsOnNodeB logs\n\n# get log output from local\n$ dm -l -c runsOnNodeB logs\n```\n\n#### configuration management\nThe configuration file for dockmaster is found at runtime via the following files in order of precedence:\n\n1. `$DOCKMASTER_CONFIG`\n2. `$DOCKMASTER_HOME/config.yml`, where `$DOCKMASTER_HOME` defaults to user's `~/.dockmaster`\n3. `/etc/dockmaster/config.yml`\n\n`dmc` will never modify the global config and always prefers `$DOCKMASTER_HOME/config.yml`.\nIf the file is not present, it will either be created with an empty configuration, or copy the current resolved configuration file, e.g. a possibly distributed `/etc/dockmaster/config.yml`.\n\nThe `dmc --help` output is largely straightforward, but here are some examples anyway:\n```shell\n# dmc ls will show you available config fields\n$ dmc ls\nArray config fields:\nPATHS\n\n$ dmc set PATHS path1 path2 path3 path4 path5\nSaved successfully\nThe new value for PATHS is:\n- path1\n- path2\n- path3\n- path4\n- path5\n\n$ dmc pop PATHS\nSaved successfully\nThe new value for PATHS is:\n- path1\n- path2\n- path3\n- path4\n\n$ dmc shift PATHS 2\nSaved successfully\nThe new value for PATHS is:\n- path3\n- path4\n\n$ dmc unshift PATHS path0 path1 path2\nSaved successfully\nThe new value for PATHS is:\n- path0\n- path1\n- path2\n- path3\n- path4\n\n$ dmc push PATHS path5 path6\nSaved successfully\nThe new value for PATHS is:\n- path0\n- path1\n- path2\n- path3\n- path4\n- path5\n- path6\n\n# dmc cat will show full configuration\n$ dmc cat\nPATHS:\n- path0\n- path1\n- path2\n- path3\n- path4\n- path5\n- path6\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtay%2Fdockmaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamtay%2Fdockmaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamtay%2Fdockmaster/lists"}