Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the remaining direct calls to docker compose #172

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions manage
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ function generateSecrets() {
function backup() {
(
_msg=$@
volumes=$(docker -l ERROR compose config --volumes)
volumes=$(${dockerCompose} config --volumes)
timeStamp=`date +\%Y-\%m-\%d_%H-%M-%S`
datePart=${timeStamp%%_*}
timePart=${timeStamp#*_}
Expand All @@ -462,6 +462,7 @@ function backup() {
fi

for volume in ${volumes}; do
volume=$(echo ${volume} |sed 's~\r$~~')
sourceVolume=${COMPOSE_PROJECT_NAME}_${volume}
archiveName=${sourceVolume}_${timeStamp}.tar.gz
archivePath="/${backupDir}/${archiveName}"
Expand All @@ -487,8 +488,9 @@ function restore() {
archiveSuffix="${datePart}_${timePart}"

if promptForConfirmation "You are about to restore from the '${archiveDirectory}' backup set.\nYour existing data will be lost if not backed up first."; then
volumes=$(docker -l ERROR compose config --volumes)
volumes=$(${dockerCompose} config --volumes)
for volume in ${volumes}; do
volume=$(echo ${volume} |sed 's~\r$~~')
targetVolume=${COMPOSE_PROJECT_NAME}_${volume}
archiveName=${targetVolume}_${archiveSuffix}
archivePath="${archiveDirectory}/${archiveName}"
Expand Down Expand Up @@ -626,7 +628,7 @@ function deleteVolumes() {
_projectName=${COMPOSE_PROJECT_NAME:-docker}

echoYellow \\n"Stopping and removing any running containers ..."
docker -l ERROR compose down -v
${dockerCompose} down -v

_pattern="^${_projectName}_\|^docker_"
_volumes=$(docker volume ls -q | grep ${_pattern})
Expand Down