Add Reddit monitoring bot — backend, frontend, and Docker config
Python/FastAPI backend with PostgreSQL for collecting Reddit data via public .json endpoints. React/Vite dashboard for analytics. Docker Compose setup with API and worker services connecting to shared PostgreSQL. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
18
backend/config.py
Normal file
18
backend/config.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
class Settings(BaseSettings):
|
||||
database_url: str = "postgresql+asyncpg://reddit:changeme@localhost:5432/reddit_monitor"
|
||||
reddit_user_agent: str = "reddit-monitor:v1.0"
|
||||
seed_subreddits: str = ""
|
||||
digest_hour_utc: int = 23
|
||||
ai_summary_enabled: bool = False
|
||||
|
||||
@property
|
||||
def database_url_sync(self) -> str:
|
||||
return self.database_url.replace("+asyncpg", "+psycopg2")
|
||||
|
||||
model_config = {"env_file": ".env", "env_file_encoding": "utf-8"}
|
||||
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user