diff --git a/src/containerapp/azext_containerapp/_up_utils.py b/src/containerapp/azext_containerapp/_up_utils.py index 120ef9937de..fbbe849ab36 100644 --- a/src/containerapp/azext_containerapp/_up_utils.py +++ b/src/containerapp/azext_containerapp/_up_utils.py @@ -832,7 +832,7 @@ def _create_github_action( ) -def up_output(app): +def up_output(app: 'ContainerApp', no_dockerfile): url = safe_get( ContainerAppClient.show(app.cmd, app.resource_group.name, app.name), "properties", @@ -846,6 +846,9 @@ def up_output(app): logger.warning( f"\nYour container app {app.name} has been created and deployed! Congrats! \n" ) + if no_dockerfile and app.ingress: + logger.warning(f"Your app is running image {app.image} and listening on port {app.target_port}") + url and logger.warning(f"Browse to your container app at: {url} \n") logger.warning( f"Stream logs for your container with: az containerapp logs show -n {app.name} -g {app.resource_group.name} \n" diff --git a/src/containerapp/azext_containerapp/custom.py b/src/containerapp/azext_containerapp/custom.py index 37d625a560e..5d32fb9696d 100644 --- a/src/containerapp/azext_containerapp/custom.py +++ b/src/containerapp/azext_containerapp/custom.py @@ -515,7 +515,10 @@ def create_containerapp(cmd, if "configuration" in r["properties"] and "ingress" in r["properties"]["configuration"] and "fqdn" in r["properties"]["configuration"]["ingress"]: not disable_warnings and logger.warning("\nContainer app created. Access your app at https://{}/\n".format(r["properties"]["configuration"]["ingress"]["fqdn"])) else: - not disable_warnings and logger.warning("\nContainer app created. To access it over HTTPS, enable ingress: az containerapp ingress enable --help\n") + target_port = target_port or "" + not disable_warnings and logger.warning("\nContainer app created. To access it over HTTPS, enable ingress: " + "az containerapp ingress enable -n %s -g %s --type external --target-port %s" + " --transport auto\n", name, resource_group_name, target_port) return r except Exception as e: @@ -2389,7 +2392,7 @@ def containerapp_up(cmd, if browse: open_containerapp_in_browser(cmd, app.name, app.resource_group.name) - up_output(app) + up_output(app, no_dockerfile=(source and not _has_dockerfile(source, dockerfile))) def containerapp_up_logic(cmd, resource_group_name, name, managed_env, image, env_vars, ingress, target_port, registry_server, registry_user, registry_pass):