zephyrdark 39d2226d95
Some checks failed
Deploy to Production / deploy (push) Failing after 46s
feat: production deployment setup with Gitea Actions CI/CD
- Remove nginx from docker-compose.prod.yml (NPM handles reverse proxy)
- Add Next.js rewrites to proxy /api/* to backend (backend fully hidden)
- Bind frontend to 127.0.0.1:3000 only (NPM proxies externally)
- Replace hardcoded localhost:8000 in history page with api client
- Make CORS origins configurable via environment variable
- Restrict CORS methods to GET/POST/PUT/DELETE
- Add Gitea Actions deploy workflow with secrets-based env management
- Add security headers (X-Frame-Options, X-Content-Type-Options, Referrer-Policy)
- Add BACKEND_URL build arg to frontend Dockerfile for standalone builds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 23:09:22 +09:00

38 lines
838 B
Python

"""
Application configuration using Pydantic Settings.
"""
from pydantic_settings import BaseSettings
from functools import lru_cache
class Settings(BaseSettings):
# Application
app_name: str = "Galaxis-Po"
debug: bool = False
# Database
database_url: str = "postgresql://galaxy:devpassword@localhost:5432/galaxy_po"
# JWT
jwt_secret: str = "dev-jwt-secret-change-in-production"
jwt_algorithm: str = "HS256"
access_token_expire_minutes: int = 60 * 24 # 24 hours
# CORS
cors_origins: str = "http://localhost:3000"
# External APIs
kis_app_key: str = ""
kis_app_secret: str = ""
kis_account_no: str = ""
dart_api_key: str = ""
class Config:
env_file = ".env"
case_sensitive = False
@lru_cache
def get_settings() -> Settings:
return Settings()