This repository was archived by the owner on Mar 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-1
lines changed
Expand file tree Collapse file tree 4 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ def __init__(
105105 "Variables" ,
106106 bucket_name = self .assets .assets_bucket .bucket_name ,
107107 db_secret = self .rds .db_secret ,
108+ full_domain_name = full_domain_name ,
108109 postgres_host = self .rds .rds_cluster .get_att (
109110 "Endpoint.Address"
110111 ).to_string (),
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ def __init__(
1212 postgres_host : str ,
1313 redis_host : str ,
1414 db_secret : secrets .ISecret ,
15+ full_domain_name : str ,
1516 ** kwargs ,
1617 ) -> None :
1718 super ().__init__ (
@@ -29,6 +30,7 @@ def __init__(
2930 self .regular_variables = {
3031 "DJANGO_SETTINGS_MODULE" : "backend.settings.production" ,
3132 "DEBUG" : "" ,
33+ "FULL_DOMAIN_NAME" : full_domain_name ,
3234 "AWS_STORAGE_BUCKET_NAME" : bucket_name ,
3335 "POSTGRES_SERVICE_HOST" : postgres_host ,
3436 "POSTGRES_PASSWORD" : db_secret .secret_value_from_json (
Original file line number Diff line number Diff line change 254254AWS_STORAGE_BUCKET_NAME = os .environ .get (
255255 "AWS_STORAGE_BUCKET_NAME" , "bucketname"
256256)
257- AWS_S3_CUSTOM_DOMAIN = f"{ AWS_STORAGE_BUCKET_NAME } .s3.amazonaws.com"
258257AWS_S3_OBJECT_PARAMETERS = {
259258 "CacheControl" : "max-age=86400" ,
260259}
Original file line number Diff line number Diff line change 1515STATICFILES_STORAGE = "backend.storage_backends.StaticStorage"
1616STATIC_URL = "/static/"
1717MEDIA_URL = "/media/"
18+ FULL_DOMAIN_NAME = os .environ .get ("FULL_DOMAIN_NAME" , "dev.mysite.com" ) # noqa
19+
20+ STATIC_ROOT = f"//{ FULL_DOMAIN_NAME } /{ STATIC_URL } /"
21+ MEDIA_ROOT = f"//{ FULL_DOMAIN_NAME } /{ MEDIA_URL } /"
22+
1823
1924# Logging
2025
You can’t perform that action at this time.
0 commit comments