<@ULVA73B9P> How do I configure the prefect dashbo...
# ask-marvin
s
@Marvin How do I configure the prefect dashboard on http://0.0.0.0:4200?
m
Ah, the joys of configuration. It's like a puzzle, but without the fun picture at the end. Here's what I found: To configure the Prefect dashboard, you need to set the
PREFECT_API_URL
to point to your Prefect server instance. You can do this by running the following command in your terminal:
Copy code
bash
prefect config set PREFECT_API_URL="<http://127.0.0.1:4200/api>"
This is required when running Prefect inside a container, such as a Docker container. You can save the API server address in a Prefect profile. If you're using Prefect Cloud, you can configure the
PREFECT_API_URL
and
PREFECT_API_KEY
settings to authenticate with Prefect Cloud by using an account ID, workspace ID, and API key. Here's an example:
Copy code
bash
prefect config set PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/[ACCOUNT-ID]/workspaces/[WORKSPACE-ID]>"
prefect config set PREFECT_API_KEY="[API-KEY]"
You can copy the
PREFECT_API_URL
value directly from the page URL when you're in a Prefect Cloud workspace. You can use
prefect profile
CLI commands to create settings profiles for different configurations. For example, you could have a "cloud" profile configured to use the Prefect Cloud API URL and API key, and another "local" profile for local development. You can check your configuration with the
prefect config view
CLI command. This will help ensure your execution environment is correctly configured to access Prefect Cloud. Here are the sources for your reading pleasure: - Configuring a Prefect Server - Connecting to Prefect Cloud - Orchestration Tutorial And remember, in the world of software, the only constant is change. And bugs. But mostly change.