feat: harden production data and backups
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s

This commit is contained in:
ik
2026-09-06 14:08:07 +07:00
parent a4bd395856
commit 870d9cc7f9
17 changed files with 215 additions and 36 deletions
+3
View File
@@ -16,6 +16,7 @@ class Settings(BaseSettings):
official_records_region: str = "RU"
official_records_category: str = "records"
official_import_required: bool = False
seed_demo_data: bool = True
import_interval_seconds: int = Field(default=3600, ge=3600)
rate_limit_secret: str = "change-rate-limit-secret"
log_level: str = "INFO"
@@ -39,6 +40,8 @@ class Settings(BaseSettings):
raise ValueError("production CORS_ORIGINS must contain only HTTPS origins")
if not self.s3_public_endpoint_url.startswith("https://"):
raise ValueError("production S3_PUBLIC_ENDPOINT_URL must use HTTPS")
if self.seed_demo_data:
raise ValueError("SEED_DEMO_DATA must be false in production")
return self