.\" Automatically generated by Pandoc 2.19.2 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "docker_compose_update" "1" "January 2023" "docker_compose_update" "" .hy .SH NAME .PP docker_compose_update - Utility to batch update \f[I]docker-compose\f[R] deployments residing in sub folders of a base directory. Configuration is done in environment files. .PD 0 .P .PD It\[cq]s part of \f[B]system-helpers\f[R]. .SH SYNOPSIS .PP \f[B]docker_compose_update\f[R] .SH DESCRIPTION .PP \f[B]docker_compose_update\f[R] is an utility to batch update \f[I]docker-compose\f[R] deployments residing in sub folders of a \f[B]base directory\f[R], e.g \f[I]/root/deployments/\f[R] having different sub folders, each having a \f[I]docker-compose\f[R] deployment in it. .PP By default, \f[B]docker_compose_update\f[R] tries to read from \f[I]$HOME/.docker_compose_update.conf\f[R] and \f[I]/etc/docker_compose_update.conf\f[R] for configuration. It will exit with a non-zero exit code if it cannot find a proper configuration file. .PP The following are at least required for the script to work: .PD 0 .P .PD - \f[B]DOCKER_COMPOSE_UPDATE_BASEDIR=\[lq]/root/deployments\[rq]\f[R] determines the \f[B]base directory\f[R] where all \f[I]docker-compose\f[R] stacks are located in their own sub-folders. .PD 0 .P .PD - \f[B]DOCKER_COMPOSE_UPDATE_IGNORES=(\[lq]mailcow\[rq])\f[R] folder names which will be ignored and not be updated, at least () is required. .PD 0 .P .PD - \f[B]DOCKER_COMPOSE_UPDATE_COMMANDS[aDirectoryName]=\[lq]./callFancyScriptInDirectory\[rq]\f[R] to explicitly define update command for one sub folder \f[I]aDirectoryName\f[R]. This is a map and defining different instructions for multiple locations is possible. Example: accessor has to match the folder, e.g.\ \f[I]/aDirectoryName\f[R] will use command \[lq]\f[I]./callFancyScriptInDirectory\[rq]\f[R] when changing directory into it. .PD 0 .P .PD - \f[B]DOCKER_COMPOSE_UPDATE_COMMAND=\[lq]sudo docker-compose down; sudo docker-compose pull; sudo docker-compose up -d;\[rq]\f[R] determines the default update command executed for each deployment. .PD 0 .P .PD - \f[B]DOCKER_COMPOSE_UPDATE_FAIL_ON_UPDATE_ERROR=\[lq]false\[rq]\f[R] determines if script fails if at least one update procedure failed. .PD 0 .P .PD .PP You can copy this script to \f[I]/usr/local/bin\f[R] and use create a custom \f[B]CONFIG_FILE\f[R] as user. .SH EXAMPLE .PP Create a \f[I]$HOME/.docker_compose_update.conf\f[R] and necessary configuration. Examples can be found in \f[I]/usr/share/doc/system-helpers/docker_compose_update\f[R]. .SH EXIT VALUES .TP \f[B]0\f[R] Success .TP \f[B]1\f[R] Error .SH AUTHORS Alexander Sch\[:a]ferdiek.