File size: 3,727 Bytes
a475b1f
 
d34ac77
e9649df
a475b1f
 
 
 
 
 
 
 
 
 
 
 
e9649df
 
 
a475b1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d34ac77
 
 
 
 
 
 
a475b1f
c6ddac7
 
 
 
 
44094a0
d34ac77
 
e9649df
44094a0
d34ac77
 
e9649df
c6ddac7
 
a475b1f
 
 
 
 
 
 
 
 
 
 
 
 
 
44094a0
 
 
 
 
 
 
 
a475b1f
 
 
 
 
 
 
44094a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Vector Store Configuration
# Options: chromadb, pinecone, qdrant, weaviate, pgvector
# Set to pgvector when using PostgreSQL (e.g., Neon)
# VECTOR_STORE_TYPE=pgvector

# Vector Store Collection Name
COLLECTION_NAME=demo_products

# Auto-Monitoring (automatically index new products)
# Set to 'true' to enable automatic product monitoring
ENABLE_AUTO_MONITOR=true

# Monitoring interval in seconds (how often to check for new products)
MONITOR_INTERVAL=60

# ChromaDB Configuration (when VECTOR_STORE_TYPE=chromadb)
# Mode: 'local' for persistent file storage (default), 'server' for remote ChromaDB server
CHROMADB_MODE=local
# CHROMADB_PATH=./app/data/chroma_db

# Pinecone Configuration (when VECTOR_STORE_TYPE=pinecone)
# PINECONE_API_KEY=your-pinecone-api-key
# PINECONE_ENVIRONMENT=us-west1-gcp
# PINECONE_INDEX_NAME=product-embeddings

# Qdrant Configuration (when VECTOR_STORE_TYPE=qdrant)
# QDRANT_URL=http://localhost:6333
# QDRANT_API_KEY=your-qdrant-api-key

# Weaviate Configuration (when VECTOR_STORE_TYPE=weaviate)
# WEAVIATE_URL=http://localhost:8080
# WEAVIATE_API_KEY=your-weaviate-api-key

# pgVector Configuration (when VECTOR_STORE_TYPE=pgvector)
# For Neon PostgreSQL, use the connection string from your Neon dashboard:
# Note: If PGVECTOR_CONNECTION_STRING is not set and DATABASE_CONNECTION_STRING is PostgreSQL,
#       it will automatically use DATABASE_CONNECTION_STRING for pgvector
PGVECTOR_CONNECTION_STRING=postgresql://neondb_owner:npg_5efnsy8gGbxt@ep-noisy-waterfall-ahqv16r5-pooler.c-3.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require

# For local PostgreSQL:
# PGVECTOR_CONNECTION_STRING=postgresql://postgres:password@localhost:5432/products_db

# Database Configuration
# Standard database connection string
# SQLite: sqlite:///path/to/database.db
# PostgreSQL: postgresql://user:password@host:port/database
# MySQL: mysql://user:password@host:port/database
# MongoDB: mongodb://user:password@host:27017/database
# When using PostgreSQL, set VECTOR_STORE_TYPE=pgvector to use the same database for vectors
# or provide a separate PGVECTOR_CONNECTION_STRING for a different database
# DATABASE_CONNECTION_STRING=postgresql://neondb_owner:npg_5efnsy8gGbxt@ep-noisy-waterfall-ahqv16r5-pooler.c-3.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require
# DATABASE_NAME=products  # Required for MongoDB if not included in connection string

# For SQLite (local development):
DATABASE_CONNECTION_STRING=sqlite:///app/data/products.db

# Database Schema Mapping (for custom database schemas)
# DATABASE_TABLE_NAME=products
# DATABASE_ID_COLUMN=id
# DATABASE_TITLE_COLUMN=title
# DATABASE_IMAGE_URL_COLUMN=image_url
# DATABASE_CATEGORY_COLUMN=category
# DATABASE_BRAND_COLUMN=brand
# DATABASE_PRICE_COLUMN=price
# DATABASE_RATING_COLUMN=rating
# DATABASE_DESCRIPTION_COLUMN=description

# CLIP Model Configuration
# Options: clip-ViT-B-32, clip-ViT-L-14
CLIP_MODEL_NAME=clip-ViT-L-14

# API Security
# Require API keys for search/products endpoints
API_KEY_REQUIRED=false
# Enforce HTTPS redirects (set true when running behind TLS terminator)
FORCE_HTTPS=false
# Trusted hosts (comma separated). Leave empty to allow all (development).
TRUSTED_HOSTS=api.example.com

# API Configuration
API_HOST=0.0.0.0
API_PORT=8000

# Data Directory
DATA_DIR=./app/data

# Observability & telemetry
PROMETHEUS_ENABLED=true
TRACING_ENABLED=false
TRACING_EXPORTER_ENDPOINT=http://localhost:4318/v1/traces
ENABLE_STRUCTURED_LOGGING=true
METRICS_RETENTION_SEC=300

# Cache and job queue
REDIS_CACHE_URL=redis://localhost:6379/0
REDIS_CACHE_PREFIX=image_search
REDIS_CACHE_TTL=300
JOB_QUEUE_URL=redis://localhost:6379/1
JOB_QUEUE_NAME=image-search-tasks
JOB_QUEUE_TIMEOUT=600