{"id":19325892,"url":"https://github.com/linkorb/shipyard-cli","last_synced_at":"2025-04-22T20:32:00.548Z","repository":{"id":201021248,"uuid":"706775027","full_name":"linkorb/shipyard-cli","owner":"linkorb","description":"Shipyard symfony CLI","archived":false,"fork":false,"pushed_at":"2024-11-07T11:28:15.000Z","size":103,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-11-07T12:29:11.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://engineering.linkorb.com","language":"PHP","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/linkorb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-18T15:36:17.000Z","updated_at":"2024-11-07T11:28:19.000Z","dependencies_parsed_at":"2023-10-23T18:24:10.172Z","dependency_job_id":"e49ee6db-7d36-408f-95a0-443b97c9a661","html_url":"https://github.com/linkorb/shipyard-cli","commit_stats":null,"previous_names":["linkorb/shipyard-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fshipyard-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fshipyard-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fshipyard-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linkorb%2Fshipyard-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linkorb","download_url":"https://codeload.github.com/linkorb/shipyard-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223903480,"owners_count":17222551,"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":[],"created_at":"2024-11-10T02:11:49.198Z","updated_at":"2024-11-10T02:11:49.821Z","avatar_url":"https://github.com/linkorb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Managed by https://github.com/linkorb/repo-ansible. Manual changes will be overwritten. --\u003e\nshipyard-cli\n============\n\nHelm + Helmfile for Docker compose, implemented as a Symfony command.\n\n## About Shipyard\n\nShipyard is a tool for orchestrating Docker swarm clusters and stacks.\n\nIt is heavily inspired by [Helm](https://helm.sh/) and [helmfile](https://github.com/helmfile/helmfile) and provides the same concepts in a non-kubernetes but swarm-enabled environment. \n\n## Concepts:\n\n* **Shipyard Chart**: A package defining a docker compose stack and all of it's related files (config files, envs, etc), similar to a Helm Chart, a yum RPM file or a Homebrew formula. A chart contains all resource definitions necessary to deploy and run an application as a Docker Swarm stack, arranged in a specific layout. A chart may be used to deploy a simple application, or a full web application stack with multiple dependencies, such as HTTP servers, database, caches and so on. (similar to a Helm Chart)\n* **Shipyard Stack**: an instance of a Shipyard Chart, customized through a `values.yaml` file. (similar to a Helm Release)\n* **shipyard.yaml**: a file defining which Charts to instantiate using which values on which docker hosts. (similar to a helmfile.yaml file)\n\nAs you can see, the concepts are very similar to Helm and helmfile. The main difference is that Shipyard is not kubernetes-specific and does not require a kubernetes cluster to run. Instead, it uses Docker Swarm to deploy the stacks.\n\n\n\n\n\n## Usage\n\n## Creating a shipyard.yaml file:\n\nThe `shipyard.yaml` file defines which stacks get deployed to which hosts. It is similar to a helmfile.yaml file.\n\n```yaml\n# shipyard.yaml\nstacks:\n  - name: my-traefik\n    chart: traefik\n    host: localhost\n    values: my-traefik/values.yaml\n    tag: lb\n\n  - name: my-whoami\n    chart: whoami\n    host: swarm-host-a\n    values: my-whoami/values.sops.yaml\n    tag: apps\n\n  - name: my-mariadb\n    chart: mariadb\n    host: swarm-host-a\n    values: my-mariadb/values.yaml\n    tag: db\n\n  - name: my-whoami-b\n    chart: whoami\n    host: swarm-host-b\n    values: my-whoami-b/values.yaml\n    tag: apps\nsettings:\n  charts_path: example/charts\n  target: remote  # Target connection. Values: remote/local\n  stack_path: /opt/shipyard/stacks  # Template directory path on the remote host\n  shipyard_tag: apps # Optionally only deploy stacks with this tag. Default: empty\n```\n\n## Creating a Shipyard Chart\n\nDirectory structure of a Shipyard Chart:\n\n```\nmy-shipyard-chart/\n  Chart.yaml # the chart metadata\n  LICENSE # the license for this chart\n  README.md # the readme for this chart\n  values.yaml # the default values for this chart\n  templates/ # the jinja2 templates for this chart\n    docker-compose.yml # the docker compose template file for this chart\n    example.conf # an example config file template for this chart\n    env.example # another example config file template for this chart\n```\n\nThe shipyard-cli will copy over all files in the `templates/` directory onto the target host, and then render them using the values from the `values.yaml` file.\nIf the host is `localhost`, the files will be copied onto the localhost.\n\n## values.yaml / values.sops.yaml and chart default values\n\nEvery stack (one instance of a chart), takes a values file containing the values for that instance of the chart.\nThe values are loaded from `{{stack_path}}/{{stack_name}}/values.yaml`. If a `values.sops.yaml` is detected, it is also loaded and decrypted automatically (based on the `.sops.yaml` in the root of your repo).\n\nEvery chat provides a default values.yaml too. Any stack-level value that remains undefined will be set to the chart's default value.\n\nThe loading (and override precedence) order is:\n\n1. the default values from the chart\n2. the values.yaml from the stack\n3. the values.sops.yaml from the stack\n\n## Target host directory structure\n\nOn the target hosts(Docker Swarm managers), Shipyard-cli will create the following directory structure:\n\n```\n/opt/shipyard/stacks/\n  my-shipyard-stack/\n    docker-compose.yml # the rendered docker compose file\n    example.conf # the rendered example config file\n    # ... etc\n```\n\n## Deploying the stacks to Docker Swarm\nAfter the templates are rendered and written to the host, the Shipyard-cli will run `docker compose up` on the target host to deploy the docker swarm stack.\n\n\n## Example Shipyard Chart\n\nSee the [example/shipyard/chart/whoami](example/charts/whoami) directory for an example Shipyard Chart.\n\n## Contributing\n\nWe welcome contributions to make this repository even better. Whether it's fixing a bug, adding a feature, or improving documentation, your help is highly appreciated. To get started, fork this repository then clone your fork.\n\nBe sure to familiarize yourself with LinkORB's [Contribution Guidelines](/CONTRIBUTING.md) for our standards around commits, branches, and pull requests, as well as our [code of conduct](/.github/CODE_OF_CONDUCT.md) before submitting any changes.\n\nIf you are unable to implement changes you like yourself, don't hesitate to open a new issue report so that we or others may take care of it.\n## Brought to you by the LinkORB Engineering team\n\n\u003cimg src=\"http://www.linkorb.com/d/meta/tier1/images/linkorbengineering-logo.png\" width=\"200px\" /\u003e\u003cbr /\u003e\nCheck out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).\nBy the way, we're hiring!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Fshipyard-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinkorb%2Fshipyard-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinkorb%2Fshipyard-cli/lists"}