This project is configured to use ngrok for exposing your application through a single public domain. The setup uses nginx as a reverse proxy to route traffic to your backend and frontend services.
you will be given a free domain on login and setting up a tunnel
https://dashboard.ngrok.com/login
run this in project root
docker compose up --build -d
docker compose down -v
# or prod build
docker-compose -f docker-compose.prod.yml up --build -d
# shutodwn
docker-compose -f docker-compose.prod.yml down -vInternet → ngrok → nginx (port 80) → {backend:8000, frontend:5173}
- ngrok: Creates a public tunnel to your local application
- nginx: Reverse proxy that routes requests:
/api/*,/auth/*,/query,/health,/docs,/redoc→ Backend (FastAPI)- Everything else → Frontend (Vite)
- Sign up for a free account at ngrok.com
- Get your authtoken from the ngrok dashboard
Create a .env file in the project root (if it doesn't exist) and add:
NGROK_AUTHTOKEN=your_ngrok_authtoken_hereOr export it in your shell:
export NGROK_AUTHTOKEN=your_ngrok_authtoken_heredocker-compose up -dThis will start:
- Neo4j (Vector Database)
- Ollama (Embeddings and Generation)
- Backend (FastAPI)
- Frontend (Vite)
- Nginx reverse proxy
- Ngrok tunnel
- Public URL: Check the ngrok web interface at
http://localhost:4040to see your public URL - Local Access: You can also access via
http://localhost(nginx) - Public Access: You and others can access the app via your ngrok provided domain found here
https://dashboard.ngrok.com/domains
If you see CORS errors like "Cross-Origin Request Blocked" when accessing through ngrok:
- Solution: The frontend has been configured to use relative URLs by default, which works with the nginx reverse proxy
- If you need to rebuild the frontend container after changes:
docker-compose up -d --build frontend
- The frontend uses
VITE_API_BASE_URLenvironment variable (set to empty string in docker-compose for relative URLs) - For local development without nginx, you can set
VITE_API_BASE_URL=http://127.0.0.1:8000in your.envfile
If port 80 is already in use, you can change it in docker-compose.yml:
nginx:
ports:
- "8080:80" # Change 8080 to any available portThen update ngrok/ngrok.yml:
tunnels:
web:
proto: http
addr: nginx:80 # Keep this as 80 (internal port)- The free ngrok plan provides one domain/tunnel
- The domain changes each time ngrok restarts (unless you have a paid plan with a static domain)
- All backend and frontend services are accessible through the single ngrok URL via path-based routing

