mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
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).
12 lines
349 B
Bash
Executable File
12 lines
349 B
Bash
Executable File
#!/bin/bash
|
|
|
|
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 up --build
|
|
else
|
|
echo "Running Plain Configuration"
|
|
docker compose up --build
|
|
fi
|