From 4f20762a626691f8cf4ad820a157ee12e6795fd4 Mon Sep 17 00:00:00 2001 From: Matthew Harris Date: Sun, 14 Jul 2024 16:10:00 -0400 Subject: [PATCH] Added defensive code to ensure variables populated if deploying --- deployment/deploy_azure.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deployment/deploy_azure.py b/deployment/deploy_azure.py index 795db8bf..74d23c98 100644 --- a/deployment/deploy_azure.py +++ b/deployment/deploy_azure.py @@ -65,9 +65,15 @@ def deploy(): Note: The variables 'container_registry', 'repo', 'azure_platform', and 'docker_compose_file' should be defined before calling this function. """ + + # if container resistry not set + if container_registry is None or container_registry == "": + print("You must set your AZURE_CONTAINER_REGISTER in .env") + sys.exit() + tags = { - "data-recipes-ai-cli-server": [f"{container_registry}/{repo}", "server"], - "data-recipes-ai-cli-chat": [f"{container_registry}/{repo}", "chat"], + "recipes-ai-server": [f"{container_registry}/{repo}", "server"], + "recipes-ai-chat": [f"{container_registry}/{repo}", "chat"], } run_cmd("az login")