{"id":15563932,"url":"https://github.com/mrsarm/pose","last_synced_at":"2025-10-24T23:12:20.979Z","repository":{"id":63134841,"uuid":"565254931","full_name":"mrsarm/pose","owner":"mrsarm","description":"Command line tool to play with 🐳 Docker Compose files","archived":false,"fork":false,"pushed_at":"2024-08-07T11:53:38.000Z","size":204,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T19:02:28.598Z","etag":null,"topics":["cli","docker","docker-compose"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/docker-pose","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrsarm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2022-11-12T20:18:35.000Z","updated_at":"2025-01-02T14:41:42.000Z","dependencies_parsed_at":"2024-02-06T21:46:50.442Z","dependency_job_id":"ce292083-5255-41fe-9a68-a06270496540","html_url":"https://github.com/mrsarm/pose","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"dbab327ada4a65a01f6fc55054bad920f0f9f837"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrsarm%2Fpose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrsarm","download_url":"https://codeload.github.com/mrsarm/pose/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248073627,"owners_count":21043473,"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":["cli","docker","docker-compose"],"created_at":"2024-10-02T16:30:53.719Z","updated_at":"2025-10-24T23:12:20.973Z","avatar_url":"https://github.com/mrsarm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Pose: a Docker Com-\"pose\" CLI\n=============================\n\n\u003e **Docker compose \"helper\" to release apps in a transactional manner !**\n\n`pose` is a command line tool to play with :whale: Docker Compose files.\n\nIt allows to list some properties from your `compose.yaml` file, but more\nimportantly, it does allow in **CI environments to tests distributed apps**\nwith docker compose, building on the fly a new compose file from another,\nreplacing tag versions from the images with a new remote\nversion (if exists), making it possible to develop a feature across\ndockerized apps, tagged with a common name, e.g. `new-tracking-field`,\nto then test them all together in a CI environment with docker compose\n(see [Run feature branches in a CI environment](#run-feature-branches-in-a-ci-environment)).\n\n## Use Cases\n\n```bash\n$ pose list services\nsales-service\npostgres\n$ pose list volumes\nsales-data\npg-data\n$ pose list envs postgres\nPORT=5432\nPOSTGRES_PASSWORD=password\n```\n\nPose looks for the compose file following the [spec](https://github.com/compose-spec/compose-spec/blob/master/spec.md#compose-file)\nas `docker compose` does, or you can specify the filename/s\nas following: `pose -f compose.yaml -f another.yaml list services`.\n\nExecute `pose --help` for more options.\n\nPose can be helpful when working with large compose files, with dozens of definitions,\nwhere looking for something or summarize it can involve more work than without using pose.\n\n#### Run feature branches in a CI environment\n\n\u003e 🐳 🖥 ⏯ ✅\n\nRead this [doc](Run-CI-envs.md) to learn how to use it for CI environments to run integration tests.\n\n#### Find that service you don't remember exactly the name\n\nIf you have dozens of services defined, some of them even with similar names, can be hard\nto look at the file and find the one you don't remember the name, then `pose list services`\ncome to the rescue ! it prints all on the standard output, so you can use something\nlike `pose list services | grep sales`. Although you can `cat compose.yaml | grep sales`,\nwith large files that can output a lot of undesired lines, e.g. lines with environment\nvariables where the `sales` string is on it, and so on.\n\n#### Get a full list of hosts names for `/etc/hosts`\n\nThis is my favorite:\n\n```bash\n$ pose list -p oneline services\nsales-service postgres redis nginx ...\n```\n\nThe `-p oneline` (or `--pretty online`) prints the list in one line, separating each\nitem with a white space, why is it useful? you can then paste the output attached to\na local IP in your `/etc/hosts`. E.g.:\n\n```\n127.0.0.1   sales-service postgres redis nginx ...\n```\n\nThis is useful when trying to access services running with Docker Compose from outside\nthe containers, e.g. you need to access a webapp from the browser, or make some queries\nto the DB with a desktop client app.\n\n#### List environment variables from a service\n\nIt's specially useful when you want to centralize in one place all the environment\nvariables used across all services for local development, but at some point you need\nto set up and run one or more services outside Docker. E.g.:\n\n```bash\n# Check the the services' environment variables\n$ pose list envs sales-services\nPORT=3000\nDATABASE_URL=postgresql://sales:pass@postgres:5432/sales_dev\n# Export them before run the service outside Docker\n$ export $(pose list envs sales-services)\n# Run the service, the envs have been set\n$ yarn start\n...\nWebserver listening at http://localhost:3000\n```\n\nYou can also export as an `.env` file the environment variables\nof any service:\n\n```bash\n$ pose list envs portal-webapp \u003e .env\n```\n\n## Build and Install\n\nLike any Rust project, install the binary `pose` in your system with:\n\n```bash\n$ cargo install docker-pose\n```\n\n(Yes, the package name in Crates.io is `docker-pose`, not `pose`).\n\nOr from the source, after cloning the source code, go to the folder and\nexecute ` cargo install --path .` or `make install` (normally it will\ninstall the binary in the `~/.cargo/bin` folder).\n\n### Binary Install\n\nBinaries are made available each release for Linux, Mac and Windows.\n\nDownload the binary on the [release](https://github.com/mrsarm/pose/releases) page.\n\nOnce downloaded, untar the file:\n\n```bash\n$ tar -xvf pose*.tar.gz\n```\n\nCheck for the execution bit:\n\n```bash\n$ chmod +x pose\n```\n\nand then execute `pose`:\n\n```bash\n$ ./pose\n```\n\nInclude the directory Pose is in, in your [PATH Variable](https://www.baeldung.com/linux/path-variable)\nif you wish to be able to execute it anywhere, or move Pose to a directory already\nincluded in your `$PATH` variable, like `$HOME/.local/bin`.\n\n### Enable tab completion\n\nRunning the following command the tab autocompletion is enabled in the current\nterminal session:\n\n```bash\n$ eval \"$(_POSE_ARGCOMPLETE=source pose)\"\n```\n\nYou can add the script to your `~/.bashrc` script, or whatever script your shell\nenvironment run when a new session starts.\n\n### Build and run tests\n\n\u003e 🚧 **Pose Development area!** this is NOT a section of how to run tests with pose\n\u003e but instructions of how to build and test pose itself.\n\nThere is a `Makefile` that can be used to execute most of the development tasks,\nlike `make release` that executes `cargo build --release`, so check out the file\neven if you don't use `make` to see useful commands.\n\n#### Tests\n\n- Run **all the tests** at once (slow): `make test-all`, include all tests, it's the\n  equivalent of what CI executes on each push to GitHub.\n- Rust unit tests: `make test`.\n- Linter: `make lint`.\n- Format checker: `make fmt-check`.\n- Shell tests: `make test-cmd`. They are written in Shell script using \n  the test framework [Bats](https://bats-core.readthedocs.io).\n- Rust integration tests: `make test-integration`. **Very slow**, they execute\n  tests to check functionality that involves _pose → docker → docker registry_.\n- Shell integration tests: `make test-cmd-integration`, **Very slow**, they execute\n  tests to check functionality that involves _pose → docker → docker registry_ calling\n  the command line.\n- Run all the tests at once: `make test-all-fast`, including all the above,\n  except integrations one.\n\nIf you get an error like `make: ./tests/bats/bin/bats: Command not found`,\nit’s because you cloned the project without the `--recurse-submodules` git argument.\nExecute first `git submodule update --init` to clone the submodules within the `pose` folder.\n\n\n## About\n\n**Source**: https://github.com/mrsarm/pose\n\n**Authors**: (2022-2025) Mariano Ruiz \u003cmrsarm (at) gmail.com\u003e\n\n**License**: GPL-3\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsarm%2Fpose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrsarm%2Fpose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrsarm%2Fpose/lists"}