Skip to content

Commit

Permalink
Added defensive code to ensure variables populated if deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
dividor committed Jul 14, 2024
1 parent 0d3d6d6 commit 4f20762
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deployment/deploy_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4f20762

Please sign in to comment.