-
Notifications
You must be signed in to change notification settings - Fork 491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to deploy to a cloud VM behind a firewall #1024
Comments
O.K., make it run on the server at last, here's my solution.
2、Reverse proxy backend as before, so the backend URI is
3、Modify the FastAPI server ~/backend/score.py to allow cross domain access from browser RaAct Javascript client to access the backend API, by adding a CORSMiddleware to the app, and allowing all sources.
Here's the running result: Cheers! 8-) |
And the evaluation metric's problem adapting to different languages is addressed in this way:
Here is the running result for Chinese. Please read the following document for details: Adapting metrics to target language. Cheers! 8-) |
Hi @icejean regarding language support @a-s-poorna already working on that it will be released in new version soon |
Great! Suggest adapting frontend to be able to be accessed through reverse proxy URI, so that it can be deployed behind a firewall together with backend. 8-) |
Hi,all,
I just try to deploy Neo4j Knowledge Graph Builder to a public cloud VM behind a firewall for a demo & research purpose, but I'm not able to work out a solution yet, here's the problem details.
As shown in the following network graph, the backend is serving at 172.18.0.2:4000, the frontend is serving at 172.18.0.3:4040, they are running with docker on a Ubuntu 22 host with a list of IPs,the IP 172.18.0.1 is for connetion with docker networks, the IP 172.17.0.1 is for accessing Ubuntu host services from the backend and frontend container, and the IP 10.60.136.78 is for public service to Windows ReAct Client, it's mapped to IP 117.50.174.65 by firewall to the public.
As the CORS rule of browser requires that ReAct Javascript client need to request backend within the same domain, I need to deploy a Nginx server and setup reverse proxy for frontend and backend. But the Nginx server can only access backend service at 172.17.0.1:4000, not at 172.18.0.2:4000, frontend is the same also:
So I config Nginx reverse proxy as follow to put frontend and backend into the same domain:
I add an environment variable to .env to tell the frontend base and point the backend URI to the reverse proxy public URI :
And modify ~/frontend/vite.config.ts as follow to set a frontend base path:
Then modify ~/frontend/Dockerfile to point the the backend to the reverse proxy URI too.
And here is the file docker-compose.yml, export extra host to activate 171.17.0.1 and map frontend to 4040, backend to 4000:
The running result is:
The source of index.html seems to be O.K..
Frontend logs:
Nginx logs:
No Nginx error log is there, so the error must happens in the ReAct client side with those Javascript, maybe with a wrong URL that hasn't been properly dealed with reverse proxy, but I just can't figure it out.
Suggest supporting this feature to deploy it to a cloud VM behind a firewall.
Best regards
Jean
The text was updated successfully, but these errors were encountered: