From 45f930a9e2c2337aa23690b50a77357baad76869 Mon Sep 17 00:00:00 2001 From: Arnav Mahalpure <100768252+AranavMahalpure@users.noreply.github.com> Date: Sun, 27 Oct 2024 14:53:47 +0530 Subject: [PATCH] Update run-with-docker-compose.sh Source Environment Variables: source .env loads environment variables from the .env file, making them available within the script. Conditional Check for Azure Configuration: The if condition checks if all required Azure variables are set (non-empty). If they are, it runs Docker Compose with docker-compose-azure.yaml. Otherwise, it defaults to the standard configuration with docker-compose.yaml. Build and Run Services: Depending on the condition, the script either builds and runs services with Azure settings (docker-compose-azure.yaml) or the standard configuration (docker-compose.yaml). --- run-with-docker-compose.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-with-docker-compose.sh b/run-with-docker-compose.sh index 61aab4675..145b1e23f 100755 --- a/run-with-docker-compose.sh +++ b/run-with-docker-compose.sh @@ -4,8 +4,8 @@ source .env if [[ -n "$OPENAI_API_BASE" ]] && [[ -n "$OPENAI_API_VERSION" ]] && [[ -n "$AZURE_DEPLOYMENT_NAME" ]] && [[ -n "$AZURE_EMBEDDINGS_DEPLOYMENT_NAME" ]]; then echo "Running Azure Configuration" - docker compose -f docker-compose-azure.yaml build && docker compose -f docker-compose-azure.yaml up + docker compose -f docker-compose-azure.yaml up --build else echo "Running Plain Configuration" - docker compose build && docker compose up + docker compose up --build fi