Hans Lellelid
09/27/2023, 3:30 PMIslam Otmani
09/27/2023, 8:04 PMHans Lellelid
09/28/2023, 12:07 AMHans Lellelid
09/28/2023, 1:51 PMlocation /prefect/ {
include proxy_params; # Header, etc.
proxy_pass <http://prefect-server:4200>;
}
with compose service like
prefect-server:
# snip
entrypoint: [ "prefect", "server", "start" ]
environment:
# Instruct the JS UI how to connect to the UI server
- PREFECT_UI_API_URL=<https://localhost/prefect/api>
- PREFECT_SERVER_API_HOST=0.0.0.0
does not work. prefect still expecting to find resources at root.Hans Lellelid
09/28/2023, 1:53 PMIslam Otmani
09/28/2023, 7:18 PM/api
after the base URL.
I did get a working scenario, with an nginx config like yours, and I set these two vars like so (ports/remote-host adapted to your example):
PREFECT_API_URL='<http://localhost/prefect/api>'
PREFECT_UI_API_URL='<http://localhost/prefect/api>' (from profile)
The API calls are sent and received just fine, the current issue is links to other pages remove the /prefect/
part and assume top-level, the API calls are made to the right URL however and you still see results (after an initial 404 UI page).
I can share a screen video if curious to see it in action, and we can open an issue to track better support for non-base-url hosting like this.Islam Otmani
09/28/2023, 7:43 PMIslam Otmani
09/28/2023, 7:43 PMHans Lellelid
09/28/2023, 7:50 PMIslam Otmani
09/28/2023, 7:57 PMHans Lellelid
09/28/2023, 8:35 PMHans Lellelid
09/30/2023, 2:32 AMlocation /prefect/ {
include proxy_params;
if ($ssl_client_verify != "SUCCESS") {
return 401;
}
proxy_pass <http://prefect-server:4200/>;
}
With config:
prefect-server:
entrypoint: [ "prefect", "server", "start" ]
environment:
# Instruct the JS UI how to connect to the UI server
- PREFECT_API_URL=<https://localhost/prefect/api>
- PREFECT_UI_API_URL=<https://localhost/prefect/api>
#- PREFECT_UI_API_URL=<http://127.0.0.1:14201/api>
- PREFECT_SERVER_API_HOST=0.0.0.0
Islam Otmani
09/30/2023, 2:48 AMHans Lellelid
12/19/2023, 8:13 PMIslam Otmani
12/19/2023, 8:14 PMHans Lellelid
12/19/2023, 8:17 PMIslam Otmani
12/19/2023, 8:18 PMHans Lellelid
12/19/2023, 8:25 PMHans Lellelid
12/19/2023, 8:25 PM