Javier SG
03/21/2025, 3:04 PMMarvin
03/21/2025, 3:04 PMlocalhost
if running locally, or it could be the IP address or domain name of a server if running in a distributed setup.
3. PREFECT_SERVER_API_BASE_PATH: This is used to specify a base path for the API when it's hosted behind a proxy or a sub-path of a domain. This might be necessary if your API is not hosted at the root of the server's domain.
In your case, deploying on an Azure Web App, ensure that these variables are set correctly to reflect the network configuration of your Azure deployment. The UI needs to connect to the API using the PREFECT_API_URL
, so make sure this URL is accessible from the webapp.
For more detailed guidance, you can refer to the Prefect documentation on settings and profiles. If you encounter further issues, ensure that your network and authentication settings are correctly configured, as indicated in the documentation.
No related GitHub issues were found, so if the problem persists, you might consider opening a new issue on the Prefect repository.Javier SG
03/21/2025, 3:10 PMMarvin
03/21/2025, 3:11 PMprefect.yaml
file under a job_variables
section. These can include variables like EXECUTION_ENVIRONMENT
and others specific to your deployment needs.
4. Source Code Location: If you're not baking your code into Docker images, you might need to specify where to pull the flow code from at runtime using the from_source
method, pointing to a GitHub repository or other storage.
5. Environment Variable Templating: In your prefect.yaml
, you can template environment variables using the {{ $ENV_VAR_NAME }}
syntax to dynamically insert values from the environment where the deployment is run.
For more detailed guidance, you can refer to the Prefect documentation on customizing deployments and Docker deployment examples.
These configurations will help ensure your Prefect deployment is robust and adaptable to different environments.Javier SG
03/21/2025, 3:44 PMMarvin
03/21/2025, 3:44 PM<https://my-domain.net>
, you should set the environment variables as follows:
1. PREFECT_API_URL: This should be set to the full URL where the Prefect API is accessible. For example:
plaintext
PREFECT_API_URL=<https://my-domain.net/api>
Ensure that /api
or the appropriate path is appended if your API is not at the root of the domain.
2. PREFECT_SERVER_API_HOST: If the API is running on the same domain, you might set this to:
plaintext
PREFECT_SERVER_API_HOST=<http://my-domain.net|my-domain.net>
However, if using a specific IP or hostname internally, adjust accordingly.
3. PREFECT_SERVER_API_BASE_PATH: If your API is hosted behind a specific path (e.g., `https://my-domain.net/prefect/api`), you should set this to:
plaintext
PREFECT_SERVER_API_BASE_PATH=/prefect/api
Otherwise, leave it empty or set to /
if the API is at the root.
These settings assume your API is directly accessible at the domain and path specified. Adjust the base path if your API is behind additional routing or proxy paths. Always ensure that the domain and paths match how your infrastructure serves the Prefect API.Javier SG
03/21/2025, 3:45 PMMarvin
03/21/2025, 3:45 PMPREFECT_API_URL
and potentially in PREFECT_SERVER_API_HOST
. For example, if your API is accessible at port 8080, you would set:
- PREFECT_API_URL:
plaintext
PREFECT_API_URL=<https://my-domain.net:8080/api>
- PREFECT_SERVER_API_HOST (if needed):
plaintext
PREFECT_SERVER_API_HOST=<http://my-domain.net:8080|my-domain.net:8080>
Including the port ensures that requests are directed to the correct endpoint, especially if your server listens on a non-standard port.Javier SG
03/21/2025, 3:45 PMMarvin
03/21/2025, 3:45 PMplaintext
PREFECT_API_URL=<https://my-domain.net:4200/api>
- PREFECT_SERVER_API_HOST (if applicable):
plaintext
PREFECT_SERVER_API_HOST=<http://my-domain.net:4200|my-domain.net:4200>
Make sure that your network configuration allows traffic on port 4200 and that your server is correctly set up to handle requests on this port.