This guide provides instructions for deploying Cohere’s Toolkit on Azure App Service using Docker Compose.
Before starting, ensure you have:
azure_compose_deploy/configuration.yaml
, and azure_compose_deploy/secrets.yaml
:
Set the deployment script variables in the azure_compose_deploy/azure_deploy.sh
file:
LOCATION=canadaeast # Azure region
RESOURCE_GROUP=toolkitResourceGroup # Resource group name
APP_NAME=toolkit-app # App name
APP_INSTANCE_SKU=P1V3 # App instance SKU
APP_PLAN_NAME=toolkit-app-plan # App plan name
REGISTRY_NAME=toolkitregistry # Docker Registry name
REGISTRY_SKU=Basic # Docker Registry SKU
DB_SERVER_NAME=toolkitpostgre # Database server name
DB_ADMIN_USER=postgres # Database admin user
DB_ADMIN_PASSWORD=postgres # Database admin password
DB_SKU_NAME=Standard_B1ms # Database SKU name
DB_TIER=Burstable # Database tier
DB_STORAGE_SIZE=32 # Database storage size
azure_compose_deploy/configuration.yaml
:
database:
url: postgresql+psycopg2://{db_user}:{db_user_password}@{db_server_name}.postgres.database.azure.com:5432
For the current deployment, the database URL should be:
postgresql+psycopg2://postgres:postgres@toolkitpostgre.postgres.database.azure.com:5432
If you have a different database URL, update the database.url
in the azure_compose_deploy/configuration.yaml
file.
Also remove the database related commands from the deployment script azure_compose_deploy/azure_deploy.sh
file.
azure_compose_deploy/secrets.yaml
:
deployments:
cohere_platform:
api_key: "your_cohere_api_key"
./azure_compose_deploy/azure_deploy.sh
./azure_compose_deploy/azure_cleanup.sh
The provided deployment script uses Azure cli to set up an Toolkit application, database and services on Azure. This deployment includes:
azure_compose_deploy/configuration.yaml
and azure_compose_deploy/secrets.yaml
files.azure_compose_deploy
directory.
To include them in the deployment, modify the azure_compose_deploy/docker-compose-azure.yml
file.
To add some additional Azure services, modify the azure_compose_deploy/azure_deploy.sh
file to add it.
Detailed information about the az cli commands can be found in the Azure CLI documentation.