Skip to content

Commit

Permalink
Update run-with-docker-compose.sh
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
AranavMahalpure authored Oct 27, 2024
1 parent 1c791f2 commit 45f930a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run-with-docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 45f930a

Please sign in to comment.