score-compose
score-compose is an implementation of the Score Workload specification for Docker compose.
Score overview
Score aims to improve developer productivity and experience by reducing the risk of configuration inconsistencies between local and remote environments. It provides developer-centric workload specification (score.yaml) which captures a workloads runtime requirements in a platform-agnostic manner. Learn more here.
The score.yaml specification file can be executed against a Score Implementation CLI, a conversion tool for application developers to generate environment specific configuration. In combination with environment specific parameters, the CLI tool can run your workload in the target environment by generating a platform-specific configuration file. The score-compose CLI is a reference implementation used to generate docker-compose.yaml files.
Installation
To install score-compose, follow the instructions as described in our installation guide.
You will also need a recent version of Docker and the Compose plugin installed. Read more here.
Get Started
If 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.
$ score-compose init --help
The init subcommand will prepare the current directory for working with score-compose and prepare any local
files or configuration needed to be successful.
A directory named .score-compose will be created if it doesn't exist. This file stores local state and generally should
not be checked into source control. Add it to your .gitignore file if you use Git as version control.
The project name will be used as a Docker compose project name when the final compose files are written. This name
acts as a namespace when multiple score files and containers are used.
Usage:
score-compose init [flags]
Flags:
-f, --file string The score file to initialize (default "./score.yaml")
-h, --help help for init
-p, --project string Set the name of the docker compose project (defaults to the current directory name)
Global Flags:
--quiet Mute any logging output
-v, --verbose count Increase log verbosity and detail by specifying this flag one or more times
Once you have a score.yaml file created, modify it by following this guide, and use score-compose run to convert it into a Docker compose manifest:
Translate the SCORE file to docker-compose configuration
Usage:
score-compose run [--file=score.yaml] [--output=compose.yaml] [flags]
Flags:
--build string Replaces 'image' name with compose 'build' instruction
--env-file string Location to store sample .env file
-f, --file string Source SCORE file (default "./score.yaml")
-h, --help help for run
-o, --output string Output file
--overrides string Overrides SCORE file (default "./overrides.score.yaml")
-p, --property stringArray Overrides selected property value
--skip-validation DEPRECATED: Disables Score file schema validation
--verbose Enable diagnostic messages (written to STDERR)
Get involved
- Give the project a star!
- Contact us via Email:
- See our documentation
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also open an issue with the tag enhancement.
- Fork the Project.
- Create your Feature Branch.
git checkout -b feature/feature-name
- Commit your Changes.
git commit -s -m "Add some AmazingFeature"
- Push to the Branch.
git push origin feature/feature-name
- Open a Pull Request.
Read CONTRIBUTING for more information.
Testing
Run the tests using go test -v ./... -race. If you do not have docker CLI installed locally or want the tests to run
faster, consider setting NO_DOCKER=true to skip any docker compose based validation during testing.
Documentation
You can find our documentation at docs.score.dev.
Roadmap
See Roadmap. You can submit an idea anytime.
License

Code of conduct
