Javier King
07/17/2025, 4:33 PMdocker exec -it prefect-server /bin/bash/
and try to curl
all of those URLs, they work fine and i receive and appropriate response. so why is prefect unable to reach them?Marvin
07/17/2025, 4:33 PMMarvin
07/17/2025, 4:34 PMyaml
services:
prefect-server:
# ... other config ...
environment:
PREFECT_API_URL: /api
PREFECT_SERVER_API_HOST: "0.0.0.0"
PREFECT_SERVER_API_PORT: 4200
command: prefect server start
ports:
- "4200:4200"
The key points to remember:
1. Use /api
as the API URL to avoid CORS and browser security issues
2. Make sure to bind to 0.0.0.0
inside the container so it's accessible from outside
3. The curl
tests from inside the container work because they bypass browser security - don't use them as a reliable test for UI connectivity
This should resolve the UI connection issues while maintaining proper security boundaries.Javier King
07/17/2025, 4:35 PMMarvin
07/17/2025, 4:35 PMMarvin
07/17/2025, 4:35 PM