Skip to content

Commit 990aec1

Browse files
committed
fix: STATICFILES_DIRS
1 parent 1d58901 commit 990aec1

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.deploy/service.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
"AWS_S3_REGION_NAME": "${AWS_S3_REGION_NAME}",
3030
"AWS_DEFAULT_ACL": "${AWS_DEFAULT_ACL}",
3131
"AWS_LOCATION": "${AWS_LOCATION}",
32-
"AWS_S3_CUSTOM_DOMAIN": "${AWS_S3_CUSTOM_DOMAIN}"
32+
"AWS_S3_CUSTOM_DOMAIN": "${AWS_S3_CUSTOM_DOMAIN}",
33+
"STATICFILES_DIRS": "${STATICFILES_DIRS}"
3334
}
3435
}
3536
]

api/urls.py

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ def get_health_check(self, request):
9494
description=str(settings.AWS_S3_REGION_NAME),
9595
health="healthy",
9696
),
97+
HealthCheck.Detail(
98+
name="STATICFILES_DIRS",
99+
description=str(settings.STATICFILES_DIRS),
100+
health="healthy",
101+
),
97102
],
98103
)
99104

settings.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@
6363
# STATIC_ROOT = get_static_root(BASE_DIR)
6464
STATIC_ROOT = os.getenv("STATIC_ROOT", BASE_DIR / "static")
6565
STATIC_URL = os.getenv("STATIC_URL", "/static/")
66-
# STATICFILES_DIRS = ["static"]
66+
STATICFILES_DIRS = (
67+
os.environ["STATICFILES_DIRS"].split(",")
68+
if os.getenv("STATICFILES_DIRS")
69+
else []
70+
)
6771

6872
# https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#settings
6973
AWS_STORAGE_BUCKET_NAME = os.getenv("AWS_STORAGE_BUCKET_NAME")

0 commit comments

Comments
 (0)