Add backend URL configuration for frontend and update nginx setup
- Added BACKEND_URL environment variable to docker-compose for frontend service. - Introduced a new entrypoint script to configure nginx with the BACKEND_URL at runtime. - Created a template for nginx configuration to handle API and WebSocket requests dynamically. - Updated README with instructions for configuring reverse proxy setups. Fixes #12
This commit is contained in:
@@ -114,6 +114,22 @@ docker compose up -d
|
||||
# Access the frontend at localhost:6767
|
||||
```
|
||||
|
||||
### Reverse proxy / Traefik setups
|
||||
|
||||
When ExcaliDash runs behind Traefik, Nginx, or another reverse proxy, configure both containers so that API + WebSocket calls resolve correctly:
|
||||
|
||||
- `FRONTEND_URL` (backend) must match the public URL that users hit (e.g. `https://excalidraw.example.com`). This controls CORS and Socket.IO origin checks.
|
||||
- `BACKEND_URL` (frontend) tells the Nginx container how to reach the backend from inside Docker/Kubernetes. Override it if your reverse proxy exposes the backend under a different hostname.
|
||||
|
||||
```yaml
|
||||
frontend:
|
||||
environment:
|
||||
- BACKEND_URL=excalidash-backend.default.svc.cluster.local:8000
|
||||
backend:
|
||||
environment:
|
||||
- FRONTEND_URL=https://excalidraw.example.com
|
||||
```
|
||||
|
||||
# Development
|
||||
|
||||
## Clone the Repository
|
||||
|
||||
Reference in New Issue
Block a user