From 3460596966c3e39f2a70003d5a679a656b78f444 Mon Sep 17 00:00:00 2001 From: Nicolas Meienberger Date: Thu, 30 Mar 2023 08:11:54 +0200 Subject: [PATCH] fix(app.sh): add the force-recreate option when starting a container --- scripts/app.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/app.sh b/scripts/app.sh index ea94c780..4cc03168 100755 --- a/scripts/app.sh +++ b/scripts/app.sh @@ -181,7 +181,7 @@ function start_app() { write_log "Failed to pull app ${app}" fi - if ! compose "${app}" up --detach; then + if ! compose "${app}" up --detach --force-recreate --remove-orphans; then write_log "Failed to start app ${app}" exit 1 fi @@ -217,15 +217,14 @@ function uninstall_app() { function update_app() { local app="${1}" - if ! compose "${app}" up --detach; then + if ! compose "${app}" up --detach --force-recreate --remove-orphans; then write_log "Failed to update app ${app}" - exit 1 fi if ! compose "${app}" down --rmi all --remove-orphans; then # just stop it if we can't remove the images if ! compose "${app}" rm --force --stop; then - write_log "Failed to uninstall app ${app}" + write_log "Failed to update app ${app}" exit 1 fi fi