From 4295c1657c8731604a7698629f63154108a6a874 Mon Sep 17 00:00:00 2001 From: burnettk Date: Mon, 11 Jul 2022 22:55:38 -0400 Subject: [PATCH] remove wait and delete volume --- bin/build_and_run_with_docker_compose | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bin/build_and_run_with_docker_compose b/bin/build_and_run_with_docker_compose index b3c50428..8811df49 100755 --- a/bin/build_and_run_with_docker_compose +++ b/bin/build_and_run_with_docker_compose @@ -19,4 +19,14 @@ fi docker compose build docker compose stop -docker compose up --wait $additional_args + +# i observed a case locally where the db had a stale sqlalchemy revision which +# caused the backend to exit and when docker compose up was running with +# --wait, it just said waiting forever (like we have seen in CI). so removing +# the volume would work around that case, if the volumes are not cleaned up in +# CI. also removing the wait prevents it from hanging forever in the case where +# the backend crashes, so then we'll just wait for the timeout to happen in the +# bin/wait_for_server_to_be_up script. +docker volume rm spiffworkflow-backend_spiffworkflow_backend || echo 'docker volume not found' + +docker compose up $additional_args