{"id":13446375,"url":"https://github.com/alexaandrov/stitchocker","last_synced_at":"2025-07-09T19:32:15.254Z","repository":{"id":98186870,"uuid":"195794358","full_name":"alexaandrov/stitchocker","owner":"alexaandrov","description":"🌈 Stitchoker its a lightweight and fast command line utility utility for conveniently grouping your docker-compose multiple container services as a single application","archived":false,"fork":false,"pushed_at":"2024-03-14T13:50:30.000Z","size":62,"stargazers_count":28,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-28T09:53:49.804Z","etag":null,"topics":["cli","cli-tool","cli-tools","containers","docker","docker-compose","docker-compose-services","grouping","microservices","multiple-containers","services","stitch","stitcher","stitching","tool","utility-scripts"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/alexaandrov.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}},"created_at":"2019-07-08T10:59:07.000Z","updated_at":"2024-09-22T06:05:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"eefde2b1-efb2-4581-ae39-3ffd13df4116","html_url":"https://github.com/alexaandrov/stitchocker","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexaandrov%2Fstitchocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexaandrov%2Fstitchocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexaandrov%2Fstitchocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexaandrov%2Fstitchocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexaandrov","download_url":"https://codeload.github.com/alexaandrov/stitchocker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225587790,"owners_count":17492632,"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","cli-tool","cli-tools","containers","docker","docker-compose","docker-compose-services","grouping","microservices","multiple-containers","services","stitch","stitcher","stitching","tool","utility-scripts"],"created_at":"2024-07-31T05:00:52.205Z","updated_at":"2024-11-20T15:54:43.803Z","avatar_url":"https://github.com/alexaandrov.png","language":"Shell","funding_links":[],"categories":["Container Operations","docker","Running Containers"],"sub_categories":["Container Composition","Composition"],"readme":"# Stitchocker\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/alexaandrov/stitchocker/blob/master/LICENSE)\n[![Release](https://img.shields.io/github/release/alexaandrov/stitchocker.svg?style=flat-square)](https://github.com/alexaandrov/stitchocker/releases/latest)\n![GitHub file size in bytes](https://img.shields.io/github/size/alexaandrov/stitchocker/stitchocker.sh.svg)\n![GitHub top language](https://img.shields.io/github/languages/top/alexaandrov/stitchocker.svg)\n\n🌈 ***Stitchoker*** its a lightweight and fast command line utility utility for conveniently grouping your docker-compose multiple container services as a single application.\n\n# Installation\n\nThe easiest way to install the latest binaries for Linux and Mac is to run this in a shell:\n\n**via curl**\n```bash\nsudo bash -c \"$(curl -fsSL https://raw.githubusercontent.com/alexaandrov/stitchocker/master/install.sh)\"\n```\n\n**via wget**\n```bash\nsudo bash -c \"$(wget -O- https://raw.githubusercontent.com/alexaandrov/stitchocker/master/install.sh)\"\n```\n\n### Manual installation\n\nIf you dont like to curl | bash you can download release from here:\n\nhttps://github.com/alexaandrov/stitchocker/releases\n\nOr via `git clone https://github.com/alexaandrov/stitchocker.git`\n\nAnd then install script manually:\n\nOption 1\n\n```bash\nsudo cp /path-to-release/stitchocker.sh /usr/local/bin/stitchocker\nsudo chmod +x /usr/local/bin/stitchocker\n```\n\nOption 2\n\n```bash\nchmod +x /path-to-release/stitchocker.sh\n```\n\nIn your .bashrc\n\n```bash\nalias stitchocker=\"/path-to-release/stitchocker.sh\"\n```\n\n# Usage\n\nFirst create in your services parent directory `docker-compose.yml' file.\n\nThis config file should be looks like:\n\n```yaml\nsets:\n    # Default set running by default\n    default:\n        # You can refer to the services that are in the directory with the stithocker config (parent directory)\n\n        parent-service-name\n        \n        # You can also point to relative sub directories\n        \n        folder-in-parent/another-folder/parent-service-name\n\n        # You can refer to the exported paths in your shell config (eg ~/.bashrc).\n        # In your shell config in this case should be:\n        # export SERVICES=\"/absolute-path-to-services-dir\"\n\n        @services/service-name-in-services-alias\n        \n        # You can also specify the absolute path to the directory with the service docker compose config\n        \n        ~/you-services-dir/another-directory/service-name\n        /home/user/you-services-dir/another-directory/service-name\n\n        # You can import your custom sets\n\n        @custom\n\n    custom:\n        another-parent-service-name\n        @services/another-service-name-in-services-alias\n        \n# Use this if you want to forward an environment from your env config to each service\n# Once you have created the env file in stitchocker directory and specified the path in stitchocker config \n# You can use environment in your service like this:\n# \"YOUR_SERVICE_ENV_NAME=${ENV_NAME_FROM_YOUR_PROJECT_FILE}\" in service docker compose environment field\n# Also you can test services environment via command \"stitchocker config\" in your stitchocker project\n# Read more about environment here: https://docs.docker.com/compose/environment-variables/\n\nenv: parent-path-to-env-file\n```\n\nThen run in your shell:\n\n```bash\nstitchocker up\n```\n\nAlso you can run stitchocker in debug mode:\n\n```bash\nstitchocker --debug up\n```\n\nOr in verbose mode:\n\n```bash\nstitchocker --verbose up\n```\n\nStitchocker help message\n```bash\n$ stitchocker -h\n\nUsage:\n        stitchocker [--verbose|--debug] [-a \u003cenv_alias\u003e] [docker-compose COMMAND] [SETS...]\n        stitchocker -h|--help\n        stitchocker -v|--version\n\n\nOptions:\n        -h|--help            Shows this help text\n        -v|--version         Shows stitchocker version\n        --update             Updates stitchocker to the latest stable version\n        --debug              Runs all commands in debug mode\n        --verbose            Runs all commands in verbose mode\n        -p                   Path to stitching directory\n        -a                   Alias to stitching directory\n\nExamples:\n        stitchocker up\n        stitchocker up default backend frontend\n        stitchocker -a my-projects-alias-from-env up default backend frontend\n        stitchocker --debug -a my-projects-alias-from-env up default backend frontend\n        stitchocker --verbose -a my-projects-alias-from-env up default backend frontend\n```\n\n# Usage Example\n\n```bash\n~ $ cat ~/.bashrc\nexport SERVICES=\"~/services\"\n```\n\n```bash\n~ $ cd ~/services\n```\n\n```bash\n~/services $ tree .\n├── reverse-proxy\n    └── ...\n    └── docker-compose.yml\n├── mysql\n    └── ...\n    └── docker-compose.yml\n├── redis\n    └── ...\n    └── docker-compose.yml\n```\n\n```bash\n~ $ cd ~/projects/demo-project\n```\n\n```bash\n~/projects/demo-project $ tree .\n├── docker-compose.yml\n├── platform\n    └── ...\n    └── docker-compose.yml\n├── landing\n    └── ...\n    └── docker-compose.yml\n├── storybook\n    └── ...\n    └── docker-compose.yml\n```\n\n```bash\n~/projects/demo-project $ cat docker-compose.yml\n```\n\n```yaml\nsets:\n    default:\n        - @services\n        - platform\n        - frontend-services/landing\n        - @development\n\n    services:\n        - @services/reverse-proxy\n        - /home/demo-user/services/mysql\n        - ~/services/mysql\n    \n    development:\n        - storybook\n```\n\n```bash\n~/projects/demo-project $ stitchocker up\nStarting reverse-proxy_proxy_1 ... done\nStarting mysql_mysql_1 ... done\nStarting redis_redis_1 ... done\nStarting platform_platform_1 ... done\nStarting landing_landing_1 ... done\nStarting storybook_storybook_1 ... done\n```\n\nor\n\n```bash\n~/projects/demo-project $ stitchocker stop\nStoping reverse-proxy_proxy_1 ... done\nStoping mysql_mysql_1 ... done\nStoping redis_redis_1 ... done\nStoping platform_platform_1 ... done\nStoping landing_landing_1 ... done\nStoping storybook_storybook_1 ... done\n```\n\nor\n\n```bash\n~/projects/demo-project $ stitchocker up services\nStarting reverse-proxy_proxy_1 ... done\nStarting mysql_mysql_1 ... done\nStarting redis_redis_1 ... done\n```\n\nor\n\n```bash\n~/projects/demo-project $ stitchocker up services devolpment\nStarting reverse-proxy_proxy_1 ... done\nStarting mysql_mysql_1 ... done\nStarting redis_redis_1 ... done\nStarting storybook_storybook_1 ... done\n```\n\nAnd so on :)\n\n# Configuration\n\n## Custom stitchocker config name\n\nBy default stitchocker can handle:\n- stitchocker.yml\n- stitchocker.yaml\n- docker-compose.yml\n- docker-compose.yaml\n\nYou can change it:\n```\nexport STITCHOCKER_CONFIG=your-custom-config-name\n```\n\n## Custom stitchocker default set name\n\nBy default the set name is `default`\n\nYou can change it:\n```\nexport STITCHOCKER_DEFAULT_SET=your-default-set-name\n```\n\n# Copyright and license\n\nCode released under the [Apache 2.0](https://raw.githubusercontent.com/alexaandrov/stitchocker/master/LICENSE) license. See LICENSE for the full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexaandrov%2Fstitchocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexaandrov%2Fstitchocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexaandrov%2Fstitchocker/lists"}