Skip to content

Dev: Allow Minio to be used without debug mode #11272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,3 +1047,5 @@ def SOCIALACCOUNT_PROVIDERS(self):
"timeout": CACHEOPS_TIMEOUT,
},
}

S3_PROVIDER = "AWS"
1 change: 1 addition & 0 deletions readthedocs/settings/docker_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def DATABASES(self): # noqa
S3_STATIC_STORAGE_BUCKET = "static"
S3_STATIC_STORAGE_OVERRIDE_HOSTNAME = PRODUCTION_DOMAIN
S3_MEDIA_STORAGE_OVERRIDE_HOSTNAME = PRODUCTION_DOMAIN
S3_PROVIDER = "minio"

AWS_S3_ENCRYPTION = False
AWS_S3_SECURE_URLS = False
Expand Down
6 changes: 1 addition & 5 deletions readthedocs/storage/s3_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
class S3BuildMediaStorageMixin(BuildMediaStorageMixin, S3Boto3Storage):
@cached_property
def _rclone(self):
provider = "AWS"
# If a custom endpoint URL is given and
# we are running in DEBUG mode, use minio as provider.
if self.endpoint_url and settings.DEBUG:
provider = "minio"
provider = settings.S3_PROVIDER

return RCloneS3Remote(
bucket_name=self.bucket_name,
Expand Down