Flyte 2 Devbox is available today to run a full Flyte backend and UI locally. Preview Flyte 2 for production, hosted on Union.ai

How app custom domains work

Below is a snippet of how to set a custom domain for your app:

create_custom_domain.py
image = flyte.Image.from_debian_base(python_version=(3, 12)).with_pip_packages("streamlit==1.41.1")

# The `App` declaration.
# Uses the `ImageSpec` declared above.
# In this case we do not need to supply any app code
# as we are using the built-in Streamlit `hello` app.
app_env = flyte.app.AppEnvironment(
    name="streamlit-hello-custom-domain",
    image=image,
    args=["streamlit", "hello", "--server.port", "8080"],
    resources=flyte.Resources(cpu="1", memory="1Gi"),
    domain=flyte.app.Domain(subdomain="custom-subdomain"),
)


if __name__ == "__main__":
    flyte.init_from_config()
    d = flyte.deploy(app_env)
    print(d[0])