From 22acfd8a2730f5232872825d1d463a30516acfa3 Mon Sep 17 00:00:00 2001 From: Nischal Shrestha Date: Tue, 30 Jul 2024 17:00:38 +0545 Subject: [PATCH] fix: index.html download always on restart & rm migration from entrypoint script --- src/backend/docker-entrypoint.sh | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/backend/docker-entrypoint.sh b/src/backend/docker-entrypoint.sh index 74835a33..707a5501 100755 --- a/src/backend/docker-entrypoint.sh +++ b/src/backend/docker-entrypoint.sh @@ -37,13 +37,8 @@ wait_for_minio() { } get_frontend_index_html() { - if [ ! -f /project/src/backend/templates/index.html ] - then - echo "/project/src/backend/templates/index.html file does not exist...trying to download from object storage.." - curl --fail --create-dirs ${S3_ENDPOINT}/${FRONTEND_BUCKET_NAME}/index.html --output /project/src/backend/templates/index.html || echo "Failed to download index.html... Please retry manually for now...." - else - echo "/project/src/backend/templates/index.html found. Continuing..." - fi + echo "Downloading index.html from object storage.." + curl --fail --create-dirs ${S3_ENDPOINT}/${FRONTEND_BUCKET_NAME}/index.html --output /project/src/backend/templates/index.html || echo "Failed to download index.html... Please retry manually for now...." } # Start wait in background with tmp log files @@ -52,9 +47,6 @@ wait_for_minio & get_frontend_index_html & wait -# Migrations -pdm run alembic upgrade head - exec "$@" exit 0