Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add image parameters to
compose.yaml
Compose files can be parameterized using Bash-style (*sigh*) syntax ([1]). We add variables `JANUS_AGGREGATOR_IMAGE`, `JANUS_MIGRATOR_IMAGE`, `DIVVIUP_API_IMAGE` and `DIVVIUP_API_MIGRATOR_IMAGE` to allow setting Docker image tags like so: ```sh DIVVIUP_API_IMAGE=myrepository.dev/divviup_api:0.0.1 \ JANUS_AGGREGATOR_IMAGE=myrepository.dev/janus_aggregator:0.7.8 \ docker compose up ``` These variables are interpolated into the `image` field of the `service` elements ([2]). Because we also have a `build` element on the `divviup-api` services, the behavior is to pull the specified image and fall back to the `build` element if it can't be found ([3]). So if you want to build `divviup-api` from source and use that, do: ```sh DIVVIUP_API_IMAGE=divviup_api:1 docker compose up ``` `divviup_api:1` will be built from the local context, unless it's already in the local Docker repository, and then launched. We provide defaults for all these images that pull from Divvi Up owned public artifact repositories. It's somewhat unfortunate that we use a `divviup-api` version that is behind `main`, but on the other hand the objective is to enable a demo experience, so it makes sense to pin Janus and divviup-api versions where the demo is known to work end-to-end. [1]: https://docs.docker.com/compose/compose-file/12-interpolation/ [2]: https://docs.docker.com/compose/compose-file/05-services/#image [3]: https://docs.docker.com/compose/compose-file/build/#using-build-and-image
- Loading branch information