BREAKING CHANGE: change docker_compose update for docker-compose v2.0.0 which is now a docker plugin itself and no standalone binary anymore

This commit is contained in:
Alexander Schäferdiek 2021-09-29 16:22:43 +02:00
parent d16a943984
commit fffd55e8a7

View file

@ -15,7 +15,7 @@ The following are at least required for the script to work:
- DOCKER_COMPOSE_UPDATE_IGNORES=("mailcow") // folder names which will be ignored and not be updated, at least () is required - DOCKER_COMPOSE_UPDATE_IGNORES=("mailcow") // folder names which will be ignored and not be updated, at least () is required
- DOCKER_COMPOSE_UPDATE_COMMANDS[aDirectoryName]="./callFancyScriptInDirectory" // use another command to update, multiple possible. - DOCKER_COMPOSE_UPDATE_COMMANDS[aDirectoryName]="./callFancyScriptInDirectory" // use another command to update, multiple possible.
Example: accessor has to match the folder, e.g. <baseDir>/aDirectoryName will use command "./callFancyScriptInDirectory" when changing directory into it. Example: accessor has to match the folder, e.g. <baseDir>/aDirectoryName will use command "./callFancyScriptInDirectory" when changing directory into it.
- DOCKER_COMPOSE_UPDATE_COMMAND="sudo docker-compose down; sudo docker-compose pull; sudo docker-compose up -d;" // the default update command for deployments - DOCKER_COMPOSE_UPDATE_COMMAND="sudo docker compose down; sudo docker compose pull; sudo docker compose up -d;" // the default update command for deployments
- DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR="false" // if set to true, script fails if at least one update procedure failed - DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR="false" // if set to true, script fails if at least one update procedure failed
You can copy this script to '/usr/local/bin' and use create a custom CONFIG_FILE as user. Examples can be found in '/usr/share/doc/<scriptname>'. You can copy this script to '/usr/local/bin' and use create a custom CONFIG_FILE as user. Examples can be found in '/usr/share/doc/<scriptname>'.
@ -50,7 +50,7 @@ source_config() {
} }
apply_defaults() { apply_defaults() {
[[ -z ${DOCKER_COMPOSE_UPDATE_IGNORES} ]] && DOCKER_COMPOSE_UPDATE_IGNORES=(); [[ -z ${DOCKER_COMPOSE_UPDATE_IGNORES} ]] && DOCKER_COMPOSE_UPDATE_IGNORES=();
[[ -z ${DOCKER_COMPOSE_UPDATE_COMMAND} ]] && DOCKER_COMPOSE_UPDATE_COMMAND="docker-compose down; docker-compose pull; docker-compose up -d;" [[ -z ${DOCKER_COMPOSE_UPDATE_COMMAND} ]] && DOCKER_COMPOSE_UPDATE_COMMAND="docker compose down; docker compose pull; docker compose up -d;"
[[ -z ${DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR} ]] && DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR="false"; [[ -z ${DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR} ]] && DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR="false";
} }
check_required() { check_required() {