forked from github/plane
dev: update configuration for the self hosted instance
This commit is contained in:
parent
ad9ff684e9
commit
8d0cd67198
@ -68,15 +68,16 @@ AWS_S3_ENDPOINT_URL = os.environ.get(
|
||||
"AWS_S3_ENDPOINT_URL", "http://plane-minio:9000"
|
||||
)
|
||||
AWS_S3_FILE_OVERWRITE = False
|
||||
AWS_DEFAULT_ACL = None
|
||||
# Public S3 bucket settings
|
||||
AWS_PUBLIC_STORAGE_BUCKET_NAME = os.environ.get("AWS_PUBLIC_STORAGE_BUCKET_NAME")
|
||||
AWS_PUBLIC_DEFAULT_ACL = "public-read"
|
||||
PUBLIC_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
|
||||
PUBLIC_FILE_STORAGE = "plane.settings.storage.PublicS3Storage"
|
||||
|
||||
# Private S3 bucket settings
|
||||
AWS_PRIVATE_STORAGE_BUCKET_NAME = os.environ.get("AWS_PRIVATE_STORAGE_BUCKET_NAME")
|
||||
AWS_PRIVATE_DEFAULT_ACL = "private"
|
||||
PRIVATE_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
|
||||
PRIVATE_FILE_STORAGE = "plane.settings.storage.PrivateS3Storage"
|
||||
## End Storage settings
|
||||
|
||||
# Honor the 'X-Forwarded-Proto' header for request.is_secure()
|
||||
|
@ -1,4 +1,3 @@
|
||||
import os
|
||||
from django.conf import settings
|
||||
from storages.backends.s3boto3 import S3Boto3Storage
|
||||
from urllib.parse import urlparse
|
||||
@ -11,9 +10,8 @@ class PublicS3Storage(S3Boto3Storage):
|
||||
|
||||
# For self hosted docker and minio
|
||||
if settings.DOCKERIZED and settings.USE_MINIO:
|
||||
parsed_url = urlparse(settings.WEB_URL)
|
||||
custom_domain = f"{parsed_url.netloc}/{bucket_name}"
|
||||
url_protocol = f"{parsed_url.scheme}:"
|
||||
custom_domain = f"{urlparse(settings.WEB_URL).netloc}/{bucket_name}"
|
||||
url_protocol = f"{urlparse(settings.WEB_URL).scheme}:"
|
||||
|
||||
|
||||
class PrivateS3Storage(S3Boto3Storage):
|
||||
@ -25,9 +23,5 @@ class PrivateS3Storage(S3Boto3Storage):
|
||||
|
||||
# For self hosted docker and minio
|
||||
if settings.DOCKERIZED and settings.USE_MINIO:
|
||||
parsed_url = urlparse(settings.WEB_URL)
|
||||
custom_domain = f"{parsed_url.netloc}/{bucket_name}"
|
||||
url_protocol = f"{parsed_url.scheme}:"
|
||||
default_acl = None
|
||||
querystring_auth = True
|
||||
addressing_style = None
|
||||
custom_domain = f"{urlparse(settings.WEB_URL).netloc}/{bucket_name}"
|
||||
url_protocol = f"{urlparse(settings.WEB_URL).scheme}:"
|
||||
|
Loading…
Reference in New Issue
Block a user