separate S3 use SSL controls for internal & public clients
Docker server image / build-and-push (push) Successful in 3m21s

This commit is contained in:
2026-03-27 17:28:37 -07:00
parent cd8ce61451
commit 407a920208
4 changed files with 15 additions and 2 deletions
@@ -15,6 +15,7 @@ class ServerConfig:
s3_secret_key: str
s3_secure: bool
s3_public_endpoint: str
s3_public_secure: bool
s3_session_ttl_seconds: int
conversion_pptx_to_pdf_timeout_seconds: int
conversion_pdf_to_images_timeout_seconds: int
@@ -27,12 +28,20 @@ class ServerConfig:
def load_server_config() -> ServerConfig:
"""Load server configuration from environment variables."""
s3_secure = os.getenv("S3_USE_SSL", "false").lower() == "true"
public_ssl_env = os.getenv("S3_PUBLIC_USE_SSL")
s3_public_secure = (
public_ssl_env.lower() == "true"
if public_ssl_env is not None
else s3_secure
)
return ServerConfig(
s3_endpoint=os.getenv("S3_ENDPOINT", "localhost:8333"),
s3_access_key=os.getenv("S3_ACCESS_KEY", "minioadmin"),
s3_secret_key=os.getenv("S3_SECRET_KEY", "minioadmin"),
s3_secure=os.getenv("S3_USE_SSL", "false").lower() == "true",
s3_secure=s3_secure,
s3_public_endpoint=os.getenv("S3_PUBLIC_ENDPOINT", "localhost:8333"),
s3_public_secure=s3_public_secure,
s3_session_ttl_seconds=int(os.getenv("S3_SESSION_TTL_SECONDS", "3600")),
conversion_pptx_to_pdf_timeout_seconds=int(
os.getenv("CONVERSION_PPTX_TO_PDF_TIMEOUT_SECONDS", "180")