From 1a72e4e609b405bc92ca7e35abd6f32b194f9474 Mon Sep 17 00:00:00 2001 From: NaysKutzu Date: Sun, 24 Nov 2024 17:30:45 +0100 Subject: [PATCH] PUSH -> I know i said the last one is the fix but this is the fixt FR FR FR --- install.bash | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/install.bash b/install.bash index b2ce128..b6b5891 100755 --- a/install.bash +++ b/install.bash @@ -28,9 +28,6 @@ chmod -R 777 ./ # Update dependencies docker exec mythicalclient_backend bash -c "COMPOSER_ALLOW_SUPERUSER=1 composer install --optimize-autoloader" -# Migrations -docker exec mythicalclient_backend bash -c "php mythicalclient migrate" - # Reset the encryption key # Check if the installation has already been completed INSTALL_FLAG=".installed" @@ -43,3 +40,11 @@ else echo "Installation already completed. Skipping..." fi +# Migrations +# Wait for the database container to be ready +until docker exec mythicalclient_database pg_isready; do + echo "Waiting for mythicalclient_database to be ready..." + sleep 2 +done + +docker exec mythicalclient_backend bash -c "php mythicalclient migrate" \ No newline at end of file