{"id":19755540,"url":"https://github.com/seibii/container_ship","last_synced_at":"2025-04-30T11:33:01.666Z","repository":{"id":35321609,"uuid":"216832951","full_name":"seibii/container_ship","owner":"seibii","description":":whale: Yet another ECS deployment tool","archived":false,"fork":false,"pushed_at":"2024-03-04T09:14:19.000Z","size":1048,"stargazers_count":8,"open_issues_count":17,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-06T01:31:42.529Z","etag":null,"topics":["container-ship","deployment","deployment-tools","docker","ecs","ecs-deployment"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/seibii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-10-22T14:22:38.000Z","updated_at":"2023-04-11T05:43:48.000Z","dependencies_parsed_at":"2024-03-04T10:27:51.654Z","dependency_job_id":null,"html_url":"https://github.com/seibii/container_ship","commit_stats":{"total_commits":717,"total_committers":9,"mean_commits":79.66666666666667,"dds":0.2259414225941423,"last_synced_commit":"b02272aac4646513a6f06bc71f5d45f0721b8e64"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seibii%2Fcontainer_ship","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seibii%2Fcontainer_ship/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seibii%2Fcontainer_ship/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seibii%2Fcontainer_ship/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seibii","download_url":"https://codeload.github.com/seibii/container_ship/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251691497,"owners_count":21628332,"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":["container-ship","deployment","deployment-tools","docker","ecs","ecs-deployment"],"created_at":"2024-11-12T03:12:04.387Z","updated_at":"2025-04-30T11:33:01.394Z","avatar_url":"https://github.com/seibii.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# container_ship\n[![Gem Version](https://badge.fury.io/rb/container_ship.svg)](https://badge.fury.io/rb/container_ship)\n[![Circle CI](https://circleci.com/gh/seibii/container_ship.svg?style=shield)](https://circleci.com/gh/seibii/container_ship)\n[![Code Climate](https://codeclimate.com/github/seibii/container_ship/badges/gpa.svg)](https://codeclimate.com/github/seibii/container_ship)\n[![Libraries.io dependency status for GitHub repo](https://img.shields.io/librariesio/github/seibii/container_ship.svg)](https://libraries.io/github/seibii/container_ship)\n![](http://ruby-gem-downloads-badge.herokuapp.com/container_ship?type=total)\n![GitHub](https://img.shields.io/github/license/seibii/container_ship.svg)\n\n`container_ship` is yet another ECS deployment tool.\n\n## Key features\n\n- Using raw `task_definition.json` file instead of a template file with complex state or variables\n- Convention over configuration \n\n## Installation\n```ruby\ngem 'container_ship'\n```\n\n## Usage\n### Prepare Dockerfile\nYou need to put `Dockerfile` in your app root directory.\nAnd all the services/tasks will use the image built with that.\n\n### Prepare task_definition.json and Dockerfile\n\n```sh\ncontainer_ship init YOUR_CLUSTER_NAME\n```\n\nwill create empty directory for you. And you must put `task_definition.json` file in directories like below. \n\n``` \nyour_app\n|-- .container_ship\n|    |-- your_cluster_name\n|    |    |-- services // ECS services \n|    |    |    |-- your_service_name // like server or api\n|    |    |    |    |-- your_envrionment_name // like production or staging\n|    |    |    |    |    |-- task_definition.json\n|    |    |    |    |\n|    |    |    |    +-- your_other_environment_name\n|    |    |    |         |-- task_definition.json\n|    |    |    |    \n|    |    |    +-- your_other_service_name\n|    |    |\n|    |    |\n|    |    +-- tasks // ECS tasks\n|    |         |-- your_task_name ( like db-migrate or \n|    |         |    |-- your_envrionment_name // like production or staging\n|    |         |    |    |-- task_definition.json\n|    |         |    |\n|    |         |    +-- your_other_environment_name\n|    |         |         |-- task_definition.json   \n|    |         +-- your_task_name ( like db-migrate or\n|    |\n|    +-- your_other_cluster_name\n|--...\n```\n\n### Prepare ECS resources\nYou must obey `convention over configuration` concept. So, naming convention is presented below.   \n\n- ECS cluster: `\"#{cluster_name}-#{environment}\"`\n- ECS service: `\"#{cluster_name}-#{service_name}-#{environment}\"`\n- ECS task:    `\"#{cluster_name}-#{task_name}-#{environment}\"`\n\nAnd export your ECR repository root uri.\n\n```sh\nexport ECR_REPOSITORY=xxxxxxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/\n```\n\n### Deploy a service\n```sh\ncontainer_ship ship CLUSTER_NAME SERVICE_NAME ENVIRONMENT BUILD_NUMBER\n```\n\nwill deploy a service in `.container_ship/CLUSTER_NAME/services/SERVICE_NAME/ENVIRONMENT/task_definition.json`\n\n### Run a task\n```sh\ncontainer_ship exec CLUSTER_NAME TASK_NAME ENVIRONMENT BUILD_NUMBER\n```\nwill run a task in `.container_ship/CLUSTER_NAME/tasks/TASK_NAME/ENVIRONMENT/task_definition.json`\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/seibii/container_ship. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n## Code of Conduct\n\nEveryone interacting in the ContainerShip project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/seibii/container_ship/blob/master/CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseibii%2Fcontainer_ship","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseibii%2Fcontainer_ship","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseibii%2Fcontainer_ship/lists"}