-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.env.example
More file actions
116 lines (103 loc) · 4.67 KB
/
Copy path.env.example
File metadata and controls
116 lines (103 loc) · 4.67 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
111
112
113
114
115
116
# ==============================================================================
# Aparsoft AI Chatbot — Environment Variables Template
# ==============================================================================
# 1. Copy this file: cp .env.example .env
# 2. Fill in your actual API keys and secrets
# 3. Never commit .env to Git! (already in .gitignore)
#
# Quick start:
# 1. docker compose up -d (starts Postgres + Redis)
# 2. cd backend && source venv/bin/activate
# 3. python manage.py migrate
# 4. python manage.py runserver
#
# Infrastructure:
# PostgreSQL + pgvector 17 : localhost:5434
# Redis 7 : localhost:6381
#
# Three databases created automatically by docker/init-db.sh:
# chatbot_db → Django models
# langchain_pgvector → pgvector embeddings for RAG
# langchain_history → LangGraph checkpoints
# ==============================================================================
# ---------------------------------------------------------------------------
# Django
# ---------------------------------------------------------------------------
DEBUG=1
DJANGO_SETTINGS_MODULE=config.settings.development
SECRET_KEY=your-secret-key-here-change-in-production
ALLOWED_HOSTS=localhost,127.0.0.1,backend
DJANGO_ADMIN_URL=chatbot-admin/
MASTER_ENCRYPTION_KEY=your-master-encryption-key-here-change-in-production
# ---------------------------------------------------------------------------
# PostgreSQL (Docker: pgvector/pgvector:pg17 → localhost:5434)
# ---------------------------------------------------------------------------
DB_NAME=chatbot_db
DB_USER=chatbot_user
DB_PASSWORD=chatbot_pass
DB_HOST=localhost
DB_PORT=5434
DATABASE_URL=postgresql://chatbot_user:chatbot_pass@localhost:5434/chatbot_db
# ---------------------------------------------------------------------------
# pgvector — RAG embeddings (separate database, same Postgres)
# ---------------------------------------------------------------------------
PGVECTOR_CONNECTION_STRING=postgresql+psycopg://chatbot_user:chatbot_pass@localhost:5434/langchain_pgvector
# ---------------------------------------------------------------------------
# LangGraph Checkpointer — conversation history (separate database, same Postgres)
# ---------------------------------------------------------------------------
PG_CHECKPOINT_URI=postgresql://chatbot_user:chatbot_pass@localhost:5434/langchain_history?sslmode=disable
# ---------------------------------------------------------------------------
# Redis (Docker: redis:7-alpine → localhost:6381)
# Redis DB 0 = cache/channels, DB 1 = Celery broker, DB 2 = Celery results
# ---------------------------------------------------------------------------
REDIS_HOST=localhost
REDIS_PORT=6381
REDIS_URL=redis://localhost:6381/0
# ---------------------------------------------------------------------------
# Celery
# ---------------------------------------------------------------------------
CELERY_BROKER_URL=redis://localhost:6381/1
CELERY_RESULT_BACKEND=redis://localhost:6381/2
CELERY_CONCURRENCY=3
CELERY_MAX_TASKS=200
CELERYD_PREFETCH_MULTIPLIER=1
# ---------------------------------------------------------------------------
# Pagination
# ---------------------------------------------------------------------------
DJANGO_PAGINATION_LIMIT=18
# ---------------------------------------------------------------------------
# CORS
# ---------------------------------------------------------------------------
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://frontend:3000
# ---------------------------------------------------------------------------
# API Keys — fill in your own!
# ---------------------------------------------------------------------------
OPENAI_API_KEY=your-openai-api-key-here
TAVILY_API_KEY=
ANTHROPIC_API_KEY=
HUGGINGFACEHUB_API_TOKEN=
DEEPGRAM_API_KEY=
USER_AGENT=APARSOFT_AI_Chatbot_Tutorial_1.0
# ---------------------------------------------------------------------------
# NextAuth v5
# ---------------------------------------------------------------------------
AUTH_SECRET=your-auth-secret
AUTH_URL=http://localhost:3000
AUTH_TRUST_HOST=true
NEXTAUTH_URL=http://localhost:3000
# GitHub OAuth (optional)
AUTH_GITHUB_ID=
AUTH_GITHUB_SECRET=
# Google OAuth (optional)
AUTH_GOOGLE_ID=
AUTH_GOOGLE_SECRET=
# ---------------------------------------------------------------------------
# Frontend (Next.js)
# ---------------------------------------------------------------------------
NEXT_PUBLIC_BASE_URL=http://localhost:8000
NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
NEXT_PUBLIC_ENCRYPTION_KEY=your-frontend-encryption-key
NEXT_PUBLIC_API_TIMEOUT=30000
NEXT_PUBLIC_API_VERSION=v1
NEXT_PUBLIC_WS_HOST=localhost:8000
NEXT_PUBLIC_WEBSOCKET_DEBUG=true