mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
feat: add internal backend URL configuration
This commit is contained in:
parent
2b6c39ad6a
commit
2657c9e871
3 changed files with 6 additions and 1 deletions
|
|
@ -71,6 +71,7 @@ EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
|
||||||
# BACKEND_URL=https://api.yourdomain.com
|
# BACKEND_URL=https://api.yourdomain.com
|
||||||
# NEXT_PUBLIC_FASTAPI_BACKEND_URL=https://api.yourdomain.com
|
# NEXT_PUBLIC_FASTAPI_BACKEND_URL=https://api.yourdomain.com
|
||||||
# NEXT_PUBLIC_ZERO_CACHE_URL=https://zero.yourdomain.com
|
# NEXT_PUBLIC_ZERO_CACHE_URL=https://zero.yourdomain.com
|
||||||
|
# FASTAPI_BACKEND_INTERNAL_URL=http://backend:8000
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Zero-cache (real-time sync)
|
# Zero-cache (real-time sync)
|
||||||
|
|
|
||||||
|
|
@ -198,6 +198,7 @@ services:
|
||||||
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE: ${AUTH_TYPE:-LOCAL}
|
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE: ${AUTH_TYPE:-LOCAL}
|
||||||
NEXT_PUBLIC_ETL_SERVICE: ${ETL_SERVICE:-DOCLING}
|
NEXT_PUBLIC_ETL_SERVICE: ${ETL_SERVICE:-DOCLING}
|
||||||
NEXT_PUBLIC_DEPLOYMENT_MODE: ${DEPLOYMENT_MODE:-self-hosted}
|
NEXT_PUBLIC_DEPLOYMENT_MODE: ${DEPLOYMENT_MODE:-self-hosted}
|
||||||
|
FASTAPI_BACKEND_INTERNAL_URL: ${FASTAPI_BACKEND_INTERNAL_URL:-http://backend:8000}
|
||||||
labels:
|
labels:
|
||||||
- "com.centurylinklabs.watchtower.enable=true"
|
- "com.centurylinklabs.watchtower.enable=true"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,10 @@ import type { Context } from "@/types/zero";
|
||||||
import { queries } from "@/zero/queries";
|
import { queries } from "@/zero/queries";
|
||||||
import { schema } from "@/zero/schema";
|
import { schema } from "@/zero/schema";
|
||||||
|
|
||||||
const backendURL = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL || "http://localhost:8000";
|
const backendURL =
|
||||||
|
process.env.FASTAPI_BACKEND_INTERNAL_URL ||
|
||||||
|
process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL ||
|
||||||
|
"http://localhost:8000";
|
||||||
|
|
||||||
async function authenticateRequest(
|
async function authenticateRequest(
|
||||||
request: Request
|
request: Request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue