Hans Lellelid
01/24/2023, 1:34 PMPREFECT_SERVER__BASE_URL
but that seems to be for v1. I'm using Traefik to reverse proxy https traffic to Prefect. The UI loads, but I see this error displayed: "Can't connect to Orion API at http://0.0.0.0:4200/api"root@e6695489d725:/opt/app/prefect# prefect config view
PREFECT_PROFILE='default'
PREFECT_ORION_API_HOST='0.0.0.0' (from env)
PREFECT_ORION_DATABASE_CONNECTION_URL='********' (from env)
My interpretation was that specifying 0.0.0.0
for the PREFECT_ORION_API_HOST was instructing Prefect to listen on non-localhost, but maybe that was a misunderstanding.PREFECT_API_URL
needs to also be set for the server when the server is running behind a reverse proxy. Here was my fix:
$ nomad alloc exec -i -t -task prefect-server 58c8ec49 /bin/bash
root@11499a2af292:/opt/app/prefect# prefect config view
PREFECT_PROFILE='default'
PREFECT_API_URL='<https://prefect-orion-dev.mycompany.tld/api>' (from env)
PREFECT_ORION_API_HOST='0.0.0.0' (from env)
PREFECT_ORION_DATABASE_CONNECTION_URL='********' (from env)
Nate
01/24/2023, 2:39 PM