fix AWS S3 startup for production deployments
Docker server image / build-and-push (push) Successful in 1m7s
Docker server image / build-and-push (push) Successful in 1m7s
Pass S3_REGION and S3_PUBLIC_USE_SSL through compose, treat blank public SSL as unset, and skip CreateBucket when IAM only allows access to an existing bucket.
This commit is contained in:
@@ -31,10 +31,10 @@ 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")
|
||||
public_ssl_env = os.getenv("S3_PUBLIC_USE_SSL", "").strip()
|
||||
s3_public_secure = (
|
||||
public_ssl_env.lower() == "true"
|
||||
if public_ssl_env is not None
|
||||
if public_ssl_env
|
||||
else s3_secure
|
||||
)
|
||||
region_env = os.getenv("S3_REGION", "").strip()
|
||||
|
||||
Reference in New Issue
Block a user