-
Notifications
You must be signed in to change notification settings - Fork 12
Enhance get_service_object & run_container_with_retries #130
Enhance get_service_object & run_container_with_retries #130
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job @sekulicd, just a couple of details.
app/core/services.py
Outdated
@@ -77,6 +78,15 @@ def get_service_object( | |||
else: | |||
service["downloaded"] = False | |||
|
|||
proxy_enabled = os.environ.get("PROXY_ENABLED", "false").lower() == "true" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put proxy_enabled
env variable loading with the rest of the configs: https://github.com/premAI-io/prem-daemon/blob/main/app/core/config.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of strings I would use boolean.
PROXY_ENABLED = os.getenv("PROXY_ENABLED", False)
and use it in services:
if config.PROXY_ENABLED:
do_stuff()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the changes. Did you push the code? @sekulicd
@sekulicd also please add the new env variable in |
what is the logic here, do we put all env vars that occurs in code base? asking this since PROXY_ENABLED is only relevant for deployment with prem-gateway. @filopedraz |
Yes, all the env variables should be there as a reference. By default, it will be |
Done |
This PR enhances run_container_with_retries by introducing dynamic Docker labeling within the predmd application to support proxy configurations.
This PR enhances the get_service_object function to dynamically construct URLs based on the availability of a DNS domain.
This closes #128
This closes #129
@filopedraz please review.