{"id":14156455,"url":"https://github.com/score-spec/score-compose","last_synced_at":"2026-01-22T07:05:48.829Z","repository":{"id":62867246,"uuid":"552661016","full_name":"score-spec/score-compose","owner":"score-spec","description":"Reference implementation for docker-compose target platform support","archived":false,"fork":false,"pushed_at":"2026-01-15T23:00:36.000Z","size":2385,"stargazers_count":453,"open_issues_count":9,"forks_count":53,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-16T02:41:18.152Z","etag":null,"topics":["compose","docker-compose","platform-engineering","score"],"latest_commit_sha":null,"homepage":"https://docs.score.dev/docs/score-implementation/score-compose/","language":"Go","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/score-spec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-10-17T02:58:05.000Z","updated_at":"2026-01-15T23:00:39.000Z","dependencies_parsed_at":"2026-01-16T01:02:38.535Z","dependency_job_id":null,"html_url":"https://github.com/score-spec/score-compose","commit_stats":null,"previous_names":[],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/score-spec/score-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/score-spec%2Fscore-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/score-spec%2Fscore-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/score-spec%2Fscore-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/score-spec%2Fscore-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/score-spec","download_url":"https://codeload.github.com/score-spec/score-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/score-spec%2Fscore-compose/sbom","scorecard":{"id":276807,"data":{"date":"2025-08-17T14:04:14Z","repo":{"name":"github.com/score-spec/score-compose","commit":"a554fafddcc088bca8a9849713d6d36a6095da8c"},"scorecard":{"version":"v5.2.1","commit":"ab2f6e92482462fe66246d9e32f642855a691dc1"},"score":7.4,"checks":[{"name":"Dependency-Update-Tool","score":10,"reason":"update tool detected","details":["Info: detected update tool: Dependabot: .github/dependabot.yml:1"],"documentation":{"short":"Determines if the project uses a dependency update tool.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dependency-update-tool"}},{"name":"Maintained","score":10,"reason":"22 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#dangerous-workflow"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: SECURITY.md:1","Info: Found linked content: SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: SECURITY.md:1","Info: Found text in security policy: SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":3,"reason":"Found 3/8 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":10,"reason":"all dependencies are pinned","details":["Info:   7 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   8 out of   8 third-party GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned","Info:   2 out of   2 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/ci.yaml:9","Warn: topLevel 'contents' permission set to 'write': .github/workflows/dependabot-auto-merge.yaml:4","Info: topLevel 'contents' permission set to 'read': .github/workflows/release.yaml:7","Info: topLevel permissions set to 'read-all': .github/workflows/scorecard.yml:18","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":2,"reason":"badge detected: InProgress","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#sast"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yaml:11"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":8,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: 'branch protection settings apply to administrators' is disabled on branch 'main'","Info: 'stale review dismissal' is required to merge on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Info: 'last push approval' is required to merge on branch 'main'","Info: 'up-to-date branches' is required to merge on branch 'main'","Info: status check found to merge onto on branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":8,"reason":"5 out of the last 5 releases have a total of 5 signed artifacts.","details":["Info: signed release artifact: checksums.txt.sig: https://github.com/score-spec/score-compose/releases/tag/0.29.3","Info: signed release artifact: checksums.txt.sig: https://github.com/score-spec/score-compose/releases/tag/0.29.2","Info: signed release artifact: checksums.txt.sig: https://github.com/score-spec/score-compose/releases/tag/0.29.1","Info: signed release artifact: checksums.txt.sig: https://github.com/score-spec/score-compose/releases/tag/0.29.0","Info: signed release artifact: checksums.txt.sig: https://github.com/score-spec/score-compose/releases/tag/0.28.0","Warn: release artifact 0.29.3 does not have provenance: https://api.github.com/repos/score-spec/score-compose/releases/229216597","Warn: release artifact 0.29.2 does not have provenance: https://api.github.com/repos/score-spec/score-compose/releases/225002894","Warn: release artifact 0.29.1 does not have provenance: https://api.github.com/repos/score-spec/score-compose/releases/224341279","Warn: release artifact 0.29.0 does not have provenance: https://api.github.com/repos/score-spec/score-compose/releases/223159041","Warn: release artifact 0.28.0 does not have provenance: https://api.github.com/repos/score-spec/score-compose/releases/215555027"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#signed-releases"}},{"name":"Contributors","score":10,"reason":"project has 3 contributing companies or organizations -- score normalized to 10","details":["Info: found contributions from: humanitec, score-spec, unemployed"],"documentation":{"short":"Determines if the project has a set of contributors from multiple organizations (e.g., companies).","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#contributors"}},{"name":"CI-Tests","score":10,"reason":"30 out of 30 merged PRs checked by a CI test -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project runs tests before pull requests are merged.","url":"https://github.com/ossf/scorecard/blob/ab2f6e92482462fe66246d9e32f642855a691dc1/docs/checks.md#ci-tests"}}]},"last_synced_at":"2025-08-17T14:40:24.566Z","repository_id":62867246,"created_at":"2025-08-17T14:40:24.566Z","updated_at":"2025-08-17T14:40:24.566Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28657626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["compose","docker-compose","platform-engineering","score"],"created_at":"2024-08-17T08:05:29.517Z","updated_at":"2026-01-22T07:05:48.814Z","avatar_url":"https://github.com/score-spec.png","language":"Go","readme":"[![ci](https://github.com/score-spec/score-compose/actions/workflows/ci.yaml/badge.svg)](https://github.com/score-spec/score-compose/actions/workflows/ci.yaml)\n[![release](https://github.com/score-spec/score-compose/actions/workflows/release.yaml/badge.svg)](https://github.com/score-spec/score-compose/actions/workflows/release.yaml)\n[![good first issues](https://img.shields.io/github/issues-search/score-spec/score-compose?query=type%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22\u0026label=good%20first%20issues\u0026style=flat\u0026logo=github)](https://github.com/score-spec/score-compose/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fscore-spec%2Fscore-compose.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fscore-spec%2Fscore-compose?ref=badge_shield)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/score-spec/score-compose/badge)](https://scorecard.dev/viewer/?uri=github.com/score-spec/score-compose)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9900/badge)](https://www.bestpractices.dev/projects/9900)\n\n\u003cimg src=\"docs/images/banner.png\"/\u003e\n\n# score-compose\n\n`score-compose` is a reference implementation of the [Score specification](https://github.com/score-spec/spec) for [Docker compose](https://docs.docker.com/compose/), primarily used for local development. It supports most aspects of the Score specification and provides a powerful resource provisioning system for supplying and customising the dynamic configuration of attached services such as databases, queues, storage, and other network or storage APIs.\n\n## Feature support\n\n`score-compose` supports as many Score features as possible, however there are certain parts that don't fit well in a local Docker case and are not supported:\n\n| Feature                                                                      | Support | Impact                                                                                                                                                                                                                                                                                                                                              |\n|------------------------------------------------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `containers.*.resources.limits` / `containers.*.resources.requests`          | none    | **Limits will be validated but ignored.** While the compose specification has some support for this, it is requires particular Docker versions that cannot be relied on. *This should have no impact on Workload execution*.                                                                                                                        |\n| `containers.*.livenessProbe.httpGet` / `containers.*.readinessProbe.httpGet` | none    | **Probes will be validated but ignored.** The Score specification details both command execution and HTTP probes, but the compose specification only supports direct command execution. We cannot convert between the two reliably, so the `exec` mode is ignored *This should have no impact on Workload execution*. Tracked in [#86](https://github.com/score-spec/score-compose/issues/86). |\n\n## Resource support\n\n`score-compose` comes with out-of-the-box support for:\n\n| Type          | Class   | Params                 | Output                                                                                                                                                          |\n| ------------- | ------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| environment   | default | (none)                 | `${KEY}`                                                                                                                                                        |\n| service-port  | default | `workload`, `port`     | `hostname`, `port`                                                                                                                                              |\n| volume        | default | (none)                 | `source`                                                                                                                                                        |\n| redis         | default | (none)                 | `host`, `port`, `username`, `password`                                                                                                                          |\n| postgres      | default | (none)                 | `host`, `port`, `name` (aka `database`), `username`, `password`                                                                                                 |\n| mysql         | default | (none)                 | `host`, `port`, `name` (aka `database`), `username`, `password`                                                                                                 |\n| s3            | default | (none)                 | `endpoint`, `access_key_id`, `secret_key`, `bucket`, with `region=\"\"`, `aws_access_key_id=\u003caccess_key_id\u003e`, and `aws_secret_key=\u003csecret_key\u003e` for compatibility |\n| dns           | default | (none)                 | `host`                                                                                                                                                          |\n| route         | default | `host`, `path`, `port` |                                                                                                                                                                 |\n| amqp          | default | (none)                 | `host`, `port`, `vhost`, `username`, `password`                                                                                                                 |\n| mongodb       | default | (none)                 | `host`, `port`, `username`, `password`, `connection`                                                                                                            |\n| kafka-topic   | default | (none)                 | `host`, `port`, `name`, `num_partitions`                                                                                                                        |\n| elasticsearch | default | (none)                 | `host`, `port`, `username`, `password`                                                                                                                          |\n| mssql         | default | (none)                 | `server`, `port`, `connection`, `database`, `username`, `password`                                                                                              |\n\nThese can be found in the default provisioners file. You are encouraged to write your own provisioners and add them to the `.score-compose` directory (with the `.provisioners.yaml` extension) or contribute them upstream to the [default.provisioners.yaml](internal/command/default.provisioners.yaml) file.\n\n## Installation\n\nTo install `score-compose`, follow the instructions as described in our [installation guide](https://docs.score.dev/docs/score-implementation/score-compose/#installation). You will also need a recent version of Docker and the Compose plugin installed. Read more [here](https://docs.docker.com/compose/install/).\n\n## Get started\n\n**NOTE**: the following examples and guides relate to `score-compose \u003e= 0.11.0`, check your version using `score-compose --version` and re-install if you're behind!\n\nSee the [examples](./examples) for more examples of using Score and provisioning resources:\n\n- [01-hello](examples/01-hello) - a basic example of a Score Workload\n- [02-environment](examples/02-environment) - an example of environment variables and the `type: environment` resource\n- [03-files](examples/03-files) - mounting local files into the running Workload\n- [04-multiple-workloads](examples/04-multiple-workloads) - examples of multiple containers and workloads together\n- [05-volume-mounts](examples/05-volume-mounts) - an example of an \"empty-dir\" volume resource with `type: volume`\n- [06-resource-provisioning](examples/06-resource-provisioning) - detailed example and information about resource provisioning and the operation of the `template://` and `cmd://` provisioners\n- [07-overrides](examples/07-overrides) - details of how to override aspects of the input Score file and output Docker compose files\n- [08-service-port-resource](examples/08-service-port-resource) - an example of using the `service-port` resource type to link between workloads\n- [09-dns-and-route](examples/09-dns-and-route) - an example of using the `dns` and `route` resources to route http requests\n- [10-amqp-rabbitmq](examples/10-amqp-rabbitmq) - an example the default `amqp` resource provisioner\n- [11-mongodb-document-database](examples/11-mongodb-document-database) - an example the default `mongodb` resource provisioner\n- [12-mysql-database](examples/12-mysql-database) - an example of the default `mysql` resource provisioner\n- [13-kafka-topic](examples/13-kafka-topic) - an example of the default `kafka-topic` resource provisioner\n- [14-elasticsearch](examples/14-elasticsearch) - an example of the default `elasticsearch` resource provisioner\n- [15-mssql-database](examples/15-mssql-database) - an example of the default `mssql` resource provisioner\n- [16-patching-templates](examples/16-patching-templates) - a guide to patch templates\n\nIf you're getting started, you can use `score-compose init` to create a basic `score.yaml` file in the current directory along with a `.score-compose/` working directory.\n\n```\n$ score-compose init --help\nThe init subcommand will prepare the current directory for working with score-compose and prepare any local\nfiles or configuration needed to be successful.\n\nA directory named .score-compose will be created if it doesn't exist. This file stores local state and generally should\nnot be checked into source control. Add it to your .gitignore file if you use Git as version control.\n\nThe project name will be used as a Docker compose project name when the final compose files are written. This name\nacts as a namespace when multiple score files and containers are used.\n\nCustom provisioners can be installed by uri using the --provisioners flag. The provisioners will be installed and take\nprecedence in the order they are defined over the default provisioners. If init has already been called with provisioners\nthe new provisioners will take precedence.\n\nTo adjust the way the compose project is generated, or perform post processing actions, you can use the --patch-templates\nflag to provide one or more template files by uri. Each template file is stored in the project and then evaluated as a \nGolang text/template and should output a yaml/json encoded array of patches. Each patch is an object with required 'op' \n(set or delete), 'patch' (a dot-separated json path), a 'value' if the 'op' == 'set', and an optional 'description' for \nshowing in the logs.\n\nUsage:\n  score-compose init [flags]\n\nExamples:\n\n  # Define a score file to generate\n  score-compose init --file score2.yaml\n\n  # Or override the docker compose project name\n  score-compose init --project score-compose2\n\n  # Or disable the default score file generation if you already have a score file\n  score-compose init --no-sample\n\n  # Optionally loading in provisoners from a remote url\n  score-compose init --provisioners https://raw.githubusercontent.com/user/repo/main/example.yaml\n\n  # Optionally adding a couple of patching templates\n  score-compose init --patch-templates ./patching.tpl --patch-templates https://raw.githubusercontent.com/user/repo/main/example.tpl\n\nURI Retrieval:\n  The --provisioners and --patch-templates arguments support URI retrieval for pulling the contents from a URI on disk\n  or over the network. These support:\n    - Files       : file:///local/file or ./local/file\n    - HTTP        : http://host/file\n    - HTTPS       : https://host/file\n    - Git (SSH)   : git-ssh://git@host/repo.git/file\n    - Git (HTTPS) : git-https://host/repo.git/file\n    - OCI         : oci://[registry/][namespace/]repository[:tag|@digest][#file]\n\nFlags:\n  -f, --file string                  The score file to initialize (default \"./score.yaml\")\n  -h, --help                         help for init\n      --no-sample                    Disable generation of the sample score file\n      --patch-templates stringArray   Patching template files to include. May be specified multiple times. Supports URI retrieval.\n  -p, --project string               Set the name of the docker compose project (defaults to the current directory name)\n      --provisioners stringArray     Provisioner files to install. May be specified multiple times. Supports URI retrieval.\n\nGlobal Flags:\n      --quiet           Mute any logging output\n  -v, --verbose count   Increase log verbosity and detail by specifying this flag one or more times\n```\n\nOnce you have a `score.yaml` file created, modify it by following [this guide](https://docs.score.dev/docs/get-started/score-compose-hello-world/), and use `score-compose generate` to convert it into a Docker compose manifest:\n\n```\nThe generate command will convert Score files in the current Score compose project into a combined Docker compose\nmanifest. All resources and links between Workloads will be resolved and provisioned as required.\n\nBy default this command looks for score.yaml in the current directory, but can take explicit file names as positional\narguments.\n\n\"score-compose init\" MUST be run first. An error will be thrown if the project directory is not present.\n\nUsage:\n  score-compose generate [flags]\n\nExamples:\n\n  # Specify Score files\n  score-compose generate score.yaml *.score.yaml\n\n  # Regenerate without adding new score files\n  score-compose generate\n\n  # Provide overrides when one score file is provided\n  score-compose generate score.yaml --override-file=./overrides.score.yaml --override-property=metadata.key=value\n\n  # Publish a port exposed by a workload for local testing\n  score-compose generate score.yaml --publish 8080:my-workload:80\n\n  # Publish a port from a resource host and port for local testing, the middle expression is RESOURCE_ID.OUTPUT_KEY\n  score-compose generate score.yaml --publish 5432:postgres#my-workload.db.host:5432\n\nFlags:\n      --build stringArray               An optional build context to use for the given container --build=container=./dir or --build=container={\"context\":\"./dir\"}\n      --env-file string                 Location to store a skeleton .env file for compose - this will override existing content\n  -h, --help                            help for generate\n      --image string                    An optional container image to use for any container with image == '.'\n  -o, --output string                   The output file to write the composed compose file to (default \"compose.yaml\")\n      --override-property stringArray   An optional set of path=key overrides to set or remove\n      --overrides-file string           An optional file of Score overrides to merge in\n      --publish stringArray             An optional set of HOST_PORT:\u003cref\u003e:CONTAINER_PORT to publish on the host system.\n\nGlobal Flags:\n      --quiet           Mute any logging output\n  -v, --verbose count   Increase log verbosity and detail by specifying this flag one or more times\n```\n\n**NOTE**: The `score-compose run` command still exists but is hidden and should be considered deprecated as it does not support resource provisioning.\n\n### Using the `--publish` flag\n\n`score-compose` installs all workloads and resource services into the compose docker network but does not publish ports on the host by default. To access ports inside the network, the user must either exec into a target container, run a new `socat` container with published ports, use a `route` resource that publishes \"public\" ports, or modify the compose.yaml directly.\n\nThe `--publish` flag on the `generate` command can be used to automatically add published ports to the services in the compose.yaml file in a safe and dynamic way. Note that this is an _ephemeral_ flag not stored in the state file. As such it should be added to the _last_ invocation of `score-compose generate` to avoid it being overridden by subsequent calls.\n\n- To publish a container port from a workload to the host, use `--publish HOST_PORT:\u003cworkload\u003e:CONTAINER_PORT`.\n- To publish a a port from one of the resource services, use `--publish HOST_PORT:\u003cresource uid\u003e.\u003coutput key\u003e:CONTAINER_PORT`. Examples of this are:\n  - `15432:postgres#my-workload.res.host:5432` - `host` is the output on the `postgres.default#my-workload.res` Postgres resource that contains the service hostname.\n  - `9001:s3.default#storage.service:9001` - `service` is the service name output on the `s3.default#storage` S3 resource.\n\nThis deprecates the use of the `compose.score.dev/publish-port` resource metadata annotation in most cases. \n\n## Testing\n\nRun the tests using `go test -v ./... -race`. If you do not have `docker` CLI installed locally or want the tests to run\nfaster, consider setting `NO_DOCKER=true` to skip any `docker compose` based validation during testing.\n\n## Get in touch\n\nLearn how to connect and engage with our community [here](https://github.com/score-spec/spec?tab=readme-ov-file#-get-in-touch).\n\n### Contribution Guidelines and Governance\n\nOur general contributor guidelines can be found in [CONTRIBUTING.md](CONTRIBUTING.md). Please note that some repositories may have additional guidelines. For more information on our governance model, please refer to [GOVERNANCE.md](https://github.com/score-spec/spec/blob/main/GOVERNANCE.md).\n\n### Documentation\n\nYou can find our documentation at [docs.score.dev](https://docs.score.dev/docs).\n\n### Roadmap\n\nSee [Roadmap](https://github.com/score-spec/spec/blob/main/roadmap.md). You can [submit an idea](https://github.com/score-spec/spec/blob/main/roadmap.md#get-involved) anytime.\n","funding_links":[],"categories":["others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscore-spec%2Fscore-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscore-spec%2Fscore-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscore-spec%2Fscore-compose/lists"}