Hi, <@U03SXGWL1K4>, I adapted your Docker Compose ...
# best-practices
b
Hi, @Ryan Peden, I adapted your Docker Compose file to Docker Swarm and I am having an issue here. Orion UI cannot connect to API: where should I start looking?
āœ… 2
a
nice! Ryan will know more but the PREFECT_API_URL doesn't seem to match between code and UI in your image
šŸ‘ 1
r
I agree with Anna - setting
PREFECT_API_URL
to
<http://172.16.8.65:4200/api>
should make this work for you.
šŸ˜Š 1
I'll add a comment in the
docker-compose.yml
file that mentions this šŸ™‚
šŸ™Œ 2
gratitude thank you 3
And just to clarify, you should only need to set this on the Orion container. If you are using a container for the agent as well, you should be able to leave its PREFECT_API_URL as http://orion:4200/api since it can communicate with Orion over the internal Docker network.
gratitude thank you 1
šŸ’Æ 1
b
thanks for being so clear and quick! I noticed there are two variables: ā€¢
PREFECT_ORION_API_HOST
set for the prefect orion container ā€¢
PREFECT_API_URL
set for the agent container ofc I'll go look them up in the docs, but if you can answer me, what is the difference and where should they be set? Edit: I'm adding the
PREFECT_API_URL
in the orion container in addition to the already present
PREFECT_ORION_API_HOST
. Edit 2: I checked the github repo and now it's as clear as it gets. Thanks!
Yep, that fixed it, the error doesn't show up anymore šŸ„°
šŸ™Œ 2
gratitude thank you 2
r
Thanks following up to let us know it is working for you! šŸ˜Š
šŸ‘ 1