alexyao2015/BitBetter

docker-compose.override.yml overridden

sylvainbx opened this issue · 1 comments

Hi,
A suggestion : maybe, instead of fully re-creating docker-compose.override.yml in patch-bitwarden.sh#L34 we can use yg to properly insert the needed lines.

For example, add the following function at the beginning of the script:

yq() {
  docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq yq "$@"
}

Then:

yq w $SCRIPT_BASE/bwdata/docker/docker-compose.override.yml "services.api.image" 'ghcr.io/alexyao2015/bitbetter:api-$BW_VERSION'
yq w $SCRIPT_BASE/bwdata/docker/docker-compose.override.yml "services.identity.image" 'ghcr.io/alexyao2015/bitbetter:identity-$BW_VERSION'

I havn't tested the above code but this is the genral idea ;)

Great idea! Are you able to test this and submit a pr if it works?