Hi everyone, I was wondering what configuration is...
# prefect-community
v
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
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:
Copy code
[server]  
  [server.ui]
  graphql_url = "<http://YOUR_MACHINES_PUBLIC_IP:4200/graphql>"
v
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)
Copy code
[server]  
  [server.ui]
  graphql_url = "<http://apollo-container:4200/graphql>"
n
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
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
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
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
Hey Vikram, glad you got that working!