Files
warehouse13/app/config.py
Mondo Diaz 2dea63f99f Add feature flags, seed data utilities, and Angular frontend scaffold
Major enhancements:
- Feature flag system for cloud vs air-gapped deployment modes
- Automatic storage backend selection based on deployment mode
- Comprehensive seed data generation utilities
- Support for generating CSV, JSON, binary, and PCAP test files
- Quick seed script for easy data generation
- Angular 19 frontend complete setup documentation
- Material Design UI component examples and configuration

Fixes:
- Resolve SQLAlchemy metadata column name conflict
- Rename metadata to custom_metadata throughout codebase
- Fix API health check issues

Documentation:
- FEATURES.md - Complete feature overview
- FRONTEND_SETUP.md - Angular 19 setup guide with examples
- SUMMARY.md - Implementation summary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-14 15:57:49 -05:00

47 lines
1.4 KiB
Python

from pydantic_settings import BaseSettings
from typing import Literal
class Settings(BaseSettings):
# Deployment mode (feature flag)
deployment_mode: Literal["cloud", "air-gapped"] = "air-gapped"
# Database
database_url: str = "postgresql://user:password@localhost:5432/datalake"
# Storage Backend (automatically set based on deployment_mode if not explicitly configured)
storage_backend: Literal["s3", "minio"] = "minio"
# AWS S3
aws_access_key_id: str = ""
aws_secret_access_key: str = ""
aws_region: str = "us-east-1"
s3_bucket_name: str = "test-artifacts"
# MinIO
minio_endpoint: str = "localhost:9000"
minio_access_key: str = "minioadmin"
minio_secret_key: str = "minioadmin"
minio_bucket_name: str = "test-artifacts"
minio_secure: bool = False
# Application
api_host: str = "0.0.0.0"
api_port: int = 8000
max_upload_size: int = 524288000 # 500MB
class Config:
env_file = ".env"
case_sensitive = False
def __init__(self, **kwargs):
super().__init__(**kwargs)
# Auto-configure storage backend based on deployment mode if not explicitly set
if self.deployment_mode == "cloud" and self.storage_backend == "minio":
self.storage_backend = "s3"
elif self.deployment_mode == "air-gapped" and self.storage_backend == "s3":
self.storage_backend = "minio"
settings = Settings()