{"id":20872767,"url":"https://github.com/zalari/ansible-deploy-docker-compose","last_synced_at":"2026-03-19T17:54:59.829Z","repository":{"id":81977566,"uuid":"148609857","full_name":"zalari/ansible-deploy-docker-compose","owner":"zalari","description":"Simple Ansible playbook to deploy a stack via docker-compose","archived":false,"fork":false,"pushed_at":"2019-11-05T15:20:58.000Z","size":18,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-19T09:41:27.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zalari.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":"2018-09-13T08:50:03.000Z","updated_at":"2024-01-14T23:19:15.000Z","dependencies_parsed_at":"2023-03-12T14:29:23.560Z","dependency_job_id":null,"html_url":"https://github.com/zalari/ansible-deploy-docker-compose","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zalari/ansible-deploy-docker-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fansible-deploy-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fansible-deploy-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fansible-deploy-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fansible-deploy-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zalari","download_url":"https://codeload.github.com/zalari/ansible-deploy-docker-compose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zalari%2Fansible-deploy-docker-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29613125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T10:52:55.328Z","status":"ssl_error","status_checked_at":"2026-02-19T10:52:26.323Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-18T06:20:50.762Z","updated_at":"2026-02-19T12:31:47.871Z","avatar_url":"https://github.com/zalari.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"zal_ari.deploy-docker-compose\n=========\n\nDeploy a docker-compose stack (TM) remotely.\n\nRequirements\n------------\n\nThe host needs to have `docker` and `docker-compose` installed and the `ansible_user` must be able to run docker.\n\nRole Variables\n--------------\n\n* **docker_compose_path**: Path to `docker-compose` binary defaults to `/usr/local/bin/docker-compose`\n* **remote_deploy_base_path**: _Base_ path, where the docker-compose stack is deployed, defaults to `/srv/docker` (which will most likely need _sudo_ perms)\n* **remote_deploy_name**: Folder name that gets appended to the **remote_deploy_base_path**; defaults to `docker-stack`\n* **remote_pull_images**: Should `docker-compose pull` be run before bringing up the stack? Defaults to `false`.\n* **deploy_path**: Path where to _local_ `docker-compose.yml` is stored; will get copied to server and **must** end with `/`!\n* _(optional)_ **remote_docker_login_registry**: Private docker registry; initially not set and thus will default to the DockerHub.\n* _(optional)_ **remote_docker_login_user**: Login for (private) docker registry; initially not set.\n* _(optional)_ **remote_docker_login_pass**: Password for (private) docker registry; initially not set. `\n* _(optional)_ **force_recreation**: _Force_ container recreation, by calling `docker-compose down` before bringing the stack `up -d`. It\n defaults to `false`. This is useful if you have changes that a normal `up -d` would not pick up (i.e. changes in _bind-mounted_ volumes).\n* _(optional)_ **force_recreation_args**: Additional arguments that are used for the remote `docker-compose down` call _before_ bringing \nup the stack. Defaults to ` || true` (sic!) to prevent failure of `docker-compose down` because it exits with non-zero codes, while for \nexample trying to delete an external network.\n* **remote_remove_only**: Remove remote docker-compose stack by invoking `docker-compose down`; defaults to `false`. Setting it to true, will skip deploying the stack (but will still copy it).\n* **remote_remove_args**: Additional arguments that get passed to `docker-compose down` if **remote_remove_only** is set to `true`. Defaults to `--rmi all --remove-orphans`\n\n**Note:** it is advised to set **remote_docker_login_pass** via the environment when invoking `ansible-playbook` instead of setting it in the actual playbook (and thus keep secrets out of a repo). An easy way to do so would be `ansible-playbook -i inventory -e \"remote_docker_login_pass=$MY_DOCKER_LOGIN\" playbook-yml`\n\n\nDependencies\n------------\n\nNope.\n\nExample Playbook\n----------------\n\n    - hosts: servers\n      roles:\n        - role: zal_ari.deploy_docker_compose\n          deploy_path: test/fixture/\n          remote_deploy_base_path: /tmp/docker\n          remote_deploy_name: hello-world\n          remote_pull_images: True\n\nTODO\n----\n* allow for login into multiple private docker registries\n* add docker-based test env\n* use Travis for building and automagic releases to Ansible Galaxy.\n\nPRs are welcome.\n\nLicense\n-------\n\nMIT\n\nAuthor Information\n------------------\n\nChristian Ulbrich [christian.ulbrich@zalari.de](), Zalari GmbH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalari%2Fansible-deploy-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalari%2Fansible-deploy-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalari%2Fansible-deploy-docker-compose/lists"}