From 4d6b0c9106738d2627577163bd6ce24236e05936 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Fri, 15 Oct 2021 16:29:17 +0200 Subject: [PATCH] Add a tiny sleep to the run_migrations script due to a weird bug with Docker (#1634) --- dev/helpers/mssql/run_migrations.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev/helpers/mssql/run_migrations.sh b/dev/helpers/mssql/run_migrations.sh index 478791e75c..0692527067 100644 --- a/dev/helpers/mssql/run_migrations.sh +++ b/dev/helpers/mssql/run_migrations.sh @@ -1,5 +1,10 @@ #!/bin/bash +# There seems to be [a bug with docker-compose](https://github.com/docker/compose/issues/4076#issuecomment-324932294) +# where it takes ~40ms to connect to the terminal output of the container, so stuff logged to the terminal in this time is lost. +# The best workaround seems to be adding tiny delay like so: +sleep 0.1; + MIGRATE_DIRECTORY="/mnt/migrator/DbScripts" LAST_MIGRATION_FILE="/mnt/data/last_migration" SERVER='localhost'