|
|
@@ -25,6 +25,38 @@ WorldWideView deploys optimally to Coolify using a Dockerfile builder.
|
|
|
|
- **Dockerfile:** Found at the project root (`Dockerfile`). Uses an Extractor Pattern (`deps` → `builder` → `runner`). The `.git` and `node_modules` folders must be explicitly untracked to prevent cache overlap.
|
|
|
|
- **Dockerfile:** Found at the project root (`Dockerfile`). Uses an Extractor Pattern (`deps` → `builder` → `runner`). The `.git` and `node_modules` folders must be explicitly untracked to prevent cache overlap.
|
|
|
|
- **Compose:** Local multi-container emulation is handled via `docker-compose.yml`.
|
|
|
|
- **Compose:** Local multi-container emulation is handled via `docker-compose.yml`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Reverse Proxies (Nginx Proxy Manager)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
When deploying WorldWideView behind a reverse proxy like Nginx Proxy Manager (NPM), you must configure both the proxy and the container environment correctly to prevent NextAuth from hanging during login, and to allow the real-time Cesium data stream to function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Container Environment Variables
|
|
|
|
|
|
|
|
NextAuth v5 requires strict host trust when placed behind a proxy. Add the following to your Docker `.env` file or Coolify environment variables:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
# Required: Tells NextAuth to trust the reverse proxy headers
|
|
|
|
|
|
|
|
AUTH_TRUST_HOST=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Required: The exact external URL your users visit
|
|
|
|
|
|
|
|
NEXTAUTH_URL=https://your-domain.com
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### Nginx Proxy Manager Configuration
|
|
|
|
|
|
|
|
In the NPM UI for your WorldWideView Proxy Host:
|
|
|
|
|
|
|
|
1. **Details Tab:** Ensure **Websockets Support** is toggled **ON** (Required for the live `/stream` telemetry).
|
|
|
|
|
|
|
|
2. **Details Tab:** Ensure **Force SSL** is toggled **ON**. NextAuth will often refuse authentication flows over plain HTTP.
|
|
|
|
|
|
|
|
3. **Advanced Tab:** Nginx Proxy Manager sometimes fails to pass the correct host headers required by Next.js. Add the following to the Custom Nginx Configuration box:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```nginx
|
|
|
|
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
|
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
|
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Optional: Disable proxy buffering if 3D tiles load slowly
|
|
|
|
|
|
|
|
proxy_buffering off;
|
|
|
|
|
|
|
|
proxy_request_buffering off;
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Reference
|
|
|
|
## Reference
|
|
|
|
- **Standalone Config:** `next.config.ts` (sets `output: "standalone"`).
|
|
|
|
- **Standalone Config:** `next.config.ts` (sets `output: "standalone"`).
|
|
|
|
- **Prisma Export:** `prisma.config.ts` ensures no CLI wrappers are invoked inside the standalone container, preventing fatal `MODULE_NOT_FOUND` runtime crashes.
|
|
|
|
- **Prisma Export:** `prisma.config.ts` ensures no CLI wrappers are invoked inside the standalone container, preventing fatal `MODULE_NOT_FOUND` runtime crashes.
|
|
|
|