-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
96 lines (80 loc) · 3.97 KB
/
.env.example
File metadata and controls
96 lines (80 loc) · 3.97 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
# ---------------------------------------------------------------
# EIDO Sentinel Environment Variables (.env.example)
#
# INSTRUCTIONS:
# 1. LOCAL DEVELOPMENT: Copy this file to .env and fill in your values.
# 2. DEPLOYMENT: When deploying to a server (like Oracle Cloud), create a .env file
# on the server and fill in the production values. You will need your server's public IP address or domain.
# ---------------------------------------------------------------
# --- Application URLs ---
# Base URL for the FastAPI backend.
#
# LOCAL DEVELOPMENT (when running ./run_all.sh or with Docker):
# Default: API_BASE_URL="http://localhost:8000"
#
# PRODUCTION DEPLOYMENT (on a server):
# You MUST set this to your server's public URL for correct CORS and documentation links.
# Example: API_BASE_URL="http://203.0.113.55:8000"
API_BASE_URL="http://localhost:8000"
# The public URL of your Streamlit UI. This is required for the backend's CORS policy to work in production.
# On a server, replace 'localhost' with your server's public IP or domain name.
# This variable is read by the backend to allow requests from the UI.
# Example: STREAMLIT_APP_URL="http://203.0.113.55:8501"
STREAMLIT_APP_URL="http://localhost:8501"
# --- Database (for Backend) ---
# Connection string for your database.
#
# LOCAL DEVELOPMENT (Default):
DATABASE_URL="sqlite+aiosqlite:///./data/eido_sentinel_local.db"
#
# PRODUCTION (NeonDB - PostgreSQL):
# 1. Get your connection string from the NeonDB dashboard.
# 2. It will look like: postgresql://user:password@ep-xxxxxxxxxxxxxx.us-east-2.aws.neon.tech/dbname?sslmode=require
# 3. Paste it here. The application will automatically handle the 'sslmode' parameter and adapt the scheme for async usage.
# DATABASE_URL="postgresql://user:password@ep-xxxxxxxxxxxxxx.us-east-2.aws.neon.tech/dbname?sslmode=require"
#
# To use other PostgreSQL (local or cloud), ensure your connection string is correct.
# Example for a managed cloud PostgreSQL: DATABASE_URL="postgresql+asyncpg://user:password@host:port/dbname"
# --- Logging (for Backend) ---
# Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL
LOG_LEVEL=INFO
# --- LLM Configuration (for Backend) ---
# Select the main LLM provider: 'google', 'openrouter', 'local', 'none'
LLM_PROVIDER="google"
# --- Google Generative AI (for Backend) ---
# Required if LLM_PROVIDER=google
GOOGLE_API_KEY=""
# Optional: Specify model. "gemini-1.5-flash-latest" is a capable and cost-effective model.
GOOGLE_MODEL_NAME="gemini-1.5-flash-latest"
# --- OpenRouter (for Backend) ---
# Required if LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=""
OPENROUTER_MODEL_NAME="openai/gpt-4o-mini"
OPENROUTER_API_BASE_URL="https://openrouter.ai/api/v1"
# --- Local LLM (Ollama, etc. via OpenAI compatible API) (for Backend) ---
# Required if LLM_PROVIDER=local
LOCAL_LLM_API_BASE_URL="http://localhost:11434/v1"
LOCAL_LLM_MODEL_NAME="llama3:latest"
LOCAL_LLM_API_KEY="ollama"
# --- Embedding Service (for Backend) ---
EMBEDDING_MODEL_NAME="all-MiniLM-L6-v2"
# --- Geocoding Service (for Backend) ---
# REQUIRED for production: Set a unique User-Agent including contact info (email) per Nominatim's policy.
# This is critical for not getting blocked by the free OpenStreetMap/Nominatim service.
GEOCODING_USER_AGENT="EidoSentinelApp/1.0 (contact: your_email@example.com)" # CHANGE THIS
# --- Incident Matching Parameters (for Backend) ---
SIMILARITY_THRESHOLD=0.70
TIME_WINDOW_MINUTES=60
DISTANCE_THRESHOLD_KM=1.0
# --- API Server Configuration (Local Development) ---
# These are used by `run_all.sh` to start the local backend server.
# In production with Docker, HOST is set to 0.0.0.0 and PORT is set by the container mapping.
API_HOST="127.0.0.1"
API_PORT=8000
# --- Streamlit UI Port (Local Development) ---
# `run_all.sh` uses this to start the local Streamlit server.
STREAMLIT_SERVER_PORT=8501
# --- Streamlit UI Auto Shutdown (Local Development) ---
# Automatically terminate Streamlit if no browser is connected for this duration (in seconds).
# Set to 0 to disable.
STREAMLIT_AUTO_SHUTDOWN_DELAY=0