feat: wire SMTP email credentials for noreply@rswag.online

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-25 00:09:08 -08:00
parent 9b432ed388
commit b050eff37f
3 changed files with 12 additions and 1 deletions

View File

@ -3,6 +3,7 @@
from functools import lru_cache
from pathlib import Path
from pydantic import AliasChoices, Field
from pydantic_settings import BaseSettings, SettingsConfigDict
@ -45,7 +46,7 @@ class Settings(BaseSettings):
smtp_host: str = "mail.rmail.online"
smtp_port: int = 587
smtp_user: str = ""
smtp_password: str = ""
smtp_password: str = Field(default="", validation_alias=AliasChoices("smtp_password", "SMTP_PASSWORD", "SMTP_PASS"))
smtp_from_email: str = "noreply@rswag.online"
smtp_from_name: str = "rSwag"

View File

@ -40,6 +40,10 @@ try:
for s in secrets['secrets']:
key = s['secretKey']
val = s['secretValue'].replace(\"'\", \"'\\\\'\")
existing = os.environ.get(key, '')
if existing and existing != val:
print(f'[infisical] Keeping explicit env var for {key}', file=sys.stderr)
continue
print(f\"export {key}='{val}'\")
except Exception as e:
print(f'[infisical] Error: {e}', file=sys.stderr)

View File

@ -48,6 +48,12 @@ services:
- SPACES_PATH=/app/spaces
- PRINTFUL_STORE_ID=${PRINTFUL_STORE_ID:-}
- PUBLIC_URL=${PUBLIC_URL:-https://rswag.online}
- SMTP_HOST=${SMTP_HOST:-mail.rmail.online}
- SMTP_PORT=${SMTP_PORT:-587}
- SMTP_USER=${SMTP_USER:-noreply@rswag.online}
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
- SMTP_FROM_EMAIL=${SMTP_FROM_EMAIL:-noreply@rswag.online}
- SMTP_FROM_NAME=${SMTP_FROM_NAME:-rSwag}
volumes:
- ./designs:/app/designs
- ./config:/app/config:ro