-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy path.env.example
More file actions
110 lines (93 loc) · 3.87 KB
/
.env.example
File metadata and controls
110 lines (93 loc) · 3.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# ============================================
# DeepTutor Environment Template
# ============================================
# Copy this file to `.env` and fill in your values.
# Core runtime settings are grouped as:
# ports / llm / embedding / search / docker-cloud / security
# --------------------------------------------
# Ports
# --------------------------------------------
BACKEND_PORT=8001
FRONTEND_PORT=3782
POCKETBASE_PORT=8090
# --------------------------------------------
# LLM (Required)
# --------------------------------------------
LLM_BINDING=openai
LLM_MODEL=gpt-4o-mini
LLM_API_KEY=sk-xxx
LLM_HOST=https://api.openai.com/v1
LLM_API_VERSION=
# --------------------------------------------
# Embedding (Required for knowledge base features)
# --------------------------------------------
EMBEDDING_BINDING=openai
EMBEDDING_MODEL=text-embedding-3-large
EMBEDDING_API_KEY=sk-xxx
EMBEDDING_HOST=https://api.openai.com/v1
EMBEDDING_DIMENSION=3072
EMBEDDING_API_VERSION=
# --------------------------------------------
# Web Search (Optional)
# --------------------------------------------
SEARCH_PROVIDER=
SEARCH_API_KEY=
SEARCH_BASE_URL=
# --------------------------------------------
# Docker / Cloud deployment (Optional)
# --------------------------------------------
# Public backend URL used by the frontend when deployed remotely.
NEXT_PUBLIC_API_BASE_EXTERNAL=
# Alternative direct API base URL.
NEXT_PUBLIC_API_BASE=
# --------------------------------------------
# Security / Networking (Optional)
# --------------------------------------------
# Keep this false in production.
DISABLE_SSL_VERIFY=false
# --------------------------------------------
# PocketBase (Optional — auth + storage sidecar)
# --------------------------------------------
# Leave POCKETBASE_URL blank to use the built-in SQLite/JSON backend (default).
# Set it to enable PocketBase for auth, sessions, and KB storage.
#
# When running via Docker Compose, PocketBase is always started but only used
# if POCKETBASE_URL is set here.
#
# Local Docker: POCKETBASE_URL=http://pocketbase:8090
# Local bare: POCKETBASE_URL=http://localhost:8090
POCKETBASE_URL=
# Admin credentials used by the Python backend to manage collections.
# Set these after running the PocketBase container for the first time.
POCKETBASE_ADMIN_EMAIL=
POCKETBASE_ADMIN_PASSWORD=
# Public PocketBase URL for OAuth redirects (remote server deployments only).
# Leave blank when browsing from the same machine running Docker.
POCKETBASE_EXTERNAL_URL=
# --------------------------------------------
# Authentication (Optional)
# --------------------------------------------
# Set AUTH_ENABLED=true to require login when hosting publicly.
# Leave as false for local/localhost usage — no login needed.
AUTH_ENABLED=false
# Secret key used to sign JWT tokens. Set to a long random string.
# Generate with: python -c "import secrets; print(secrets.token_hex(32))"
AUTH_SECRET=
# How long login sessions last in hours (default: 24)
AUTH_TOKEN_EXPIRE_HOURS=24
# Must match AUTH_ENABLED above so the frontend knows to show the login page.
NEXT_PUBLIC_AUTH_ENABLED=false
# --- Multi-user setup (recommended) ---
# With AUTH_ENABLED=true and no AUTH_USERNAME/AUTH_PASSWORD_HASH set, navigate
# to /register in the browser. The first user to register is automatically
# granted admin privileges and can manage other users from /admin/users.
# Users are stored in data/user/auth_users.json.
# --- Single-user env-var setup (legacy / simple) ---
# Alternatively, set AUTH_USERNAME and AUTH_PASSWORD_HASH directly.
# This user is always treated as admin. When auth_users.json exists, it takes
# priority and these env vars are ignored.
# Username for the single admin account (single-user mode only).
AUTH_USERNAME=
# Bcrypt hash of the password. Generate with:
# python -c "from deeptutor.services.auth import hash_password; print(hash_password('yourpassword'))"
AUTH_PASSWORD_HASH=