From 3e548e636a7bbcc4af2abb530fed982a61ab7526 Mon Sep 17 00:00:00 2001 From: Paul Yu Date: Fri, 8 Dec 2023 09:09:46 -0800 Subject: [PATCH] docs: update readme --- src/makeline-service/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/makeline-service/README.md b/src/makeline-service/README.md index 628c3c07..032d2f89 100644 --- a/src/makeline-service/README.md +++ b/src/makeline-service/README.md @@ -85,22 +85,25 @@ export ORDER_DB_COLLECTION_NAME=orders To run this against Azure CosmosDB, you will need to create the CosmosDB account, the database, and collection. You can do this using the Azure CLI. +> Azure CosmosDB supports multiple APIs. This app supports both the MongoDB and SQL APIs. You will need to create the database and collection based on the API you want to use. + ```bash RGNAME= LOCNAME= COSMOSDBNAME= az group create --name $RGNAME --location $LOCNAME -az cosmosdb create --name $COSMOSDBNAME --resource-group $RGNAME --kind MongoDB # or --kind GlobalDocumentDB (for SQL API) # if database requires MongoDB API # create the database and collection +az cosmosdb create --name $COSMOSDBNAME --resource-group $RGNAME --kind MongoDB az cosmosdb mongodb database create --account-name $COSMOSDBNAME --name orderdb --resource-group $RGNAME az cosmosdb mongodb collection create --account-name $COSMOSDBNAME --database-name orderdb --name orders --resource-group $RGNAME # if database requires SQL API # create the database and container -COSMOSDBPARTITIONKEY= +COSMOSDBPARTITIONKEY=storeId +az cosmosdb create --name $COSMOSDBNAME --resource-group $RGNAME --kind GlobalDocumentDB az cosmosdb sql database create --account-name $COSMOSDBNAME --name orderdb --resource-group $RGNAME az cosmosdb sql container create --account-name $COSMOSDBNAME --database-name orderdb --name orders --resource-group $RGNAME --partition-key-path /$COSMOSDBPARTITIONKEY ```