Skip to content

Commit

Permalink
Black..
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasTrg authored May 22, 2024
1 parent 7f93e6d commit 21c1fb3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agenta-backend/agenta_backend/services/deployment_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ async def validate_image(image: Image) -> bool:
def get_deployment_uri(deployment: DeploymentDB) -> str:
"""
Builds a URI allowing the backend to access a given deployment.
In the case of a self-hosted setup, we bypass traefik and use the docker generated dns entry instead.
In the case of a self-hosted setup, we bypass traefik and use the docker generated dns entry instead.
Args:
deployment (DeploymentDB): The deployment to reach.
Returns:
str: URI leading to the deployment
str: URI leading to the deployment.
"""
if "localhost" in deployment.uri:
# the DNS entry automatically created by docker for the container are the first 12 characters of the container's id
return "http://"+deployment.container_id[:12]
return "http://" + deployment.container_id[:12]
return deployment.uri

0 comments on commit 21c1fb3

Please sign in to comment.