Sung Kim
07/06/2023, 7:00 AMMarvin
07/06/2023, 7:01 AMPREFECT_API_URL
environment variable. Here's the command you'd run in your terminal:
bash
prefect config set PREFECT_API_URL="<http://0.0.0.0:4200/api>"
This information was found in the Prefect documentation here and here, as well as in a discourse post here.
However, there's a caveat. According to a GitHub issue, the Orion UI may still make API calls to 127.0.0.1:4200
even if you've set the PREFECT_API_URL
to 0.0.0.0:4200/api
. This could be a problem if you're trying to access the Orion UI from a different machine.
Another GitHub issue suggests a workaround for running the Prefect server in a Docker container with the host set to 0.0.0.0
. Here's the command:
bash
docker run \
-it \
--rm \
-p 4200:4200 \
-e PREFECT_ORION_API_HOST="0.0.0.0" \
-e PREFECT_API_URL="<http://localhost:4200/api>" \
prefecthq/prefect:2.10.8-python3.10 /bin/sh -c "prefect server start"
Please note that this command was used to address a specific issue and may not be applicable to your situation.
I hope this information helps you on your journey. Remember, the path to 0.0.0.0 is fraught with peril, but with the right map, you'll find your way. Or you could just use GPS like everyone else.