https://prefect.io logo
Title
v

Vikram Iyer

07/27/2020, 5:45 AM
Hi everyone, I was wondering what configuration is required to not see the below error. So, by default the
PREFECT_SERVER__GRAPHQL_URL
is set to http://localhost:4200/graphql but I want to change it some other URL. How can I achieve this?
n

nicholas

07/27/2020, 2:53 PM
hi @Vikram Iyer - you'll need to modify your configuration file at
~/.prefect/config,toml
(on whichever machine you're hosting Prefect Server) to look like this:
[server]  
  [server.ui]
  graphql_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
v

Vikram Iyer

07/27/2020, 5:08 PM
Thanks @nicholas. What happens if all the services are running in containers on a server which is not accessible via public IP? Can we not point it to
apollo
server's container? Something like, (containers are in the same network)
[server]  
  [server.ui]
  graphql_url = "<http://apollo-container:4200/graphql>"
n

nicholas

07/27/2020, 5:12 PM
Unfortunately that won't work because your local browser is what's trying to access that API; if the API isn't available in the network your browser has access to, your UI will never be able to connect.
v

Vikram Iyer

07/27/2020, 5:23 PM
Oh! Is there any solution to this kind of problem? Also, would this affect the flow runs or just that the UI wont be working?
n

nicholas

07/27/2020, 5:25 PM
This'll just impact the UI, flow runs should operate as expected. There aren't any straightforward solutions but I know a few people have successfully used proxy/custom auth layers to make it work. Unfortunately that's not something we support so I won't be able to help much there
v

Vikram Iyer

07/28/2020, 5:34 AM
Sure, Nicholas. Thanks. I am thinking of some form of tunnelling as well. However, would it be asking too much to ask for people who have accomplished what you said above?
Hey Nick, I got the UI working, thanks. Now, when I register a flow, I the request is still forwarded to localhost. What might I be doing wrong?
Hey Nick, I got it. A very funny mistake, had to set the prefect server backend in the container that i was registering the flow from. Thanks for your help anyways.
n

nicholas

07/30/2020, 2:03 PM
Hey Vikram, glad you got that working!