Dockerize Django app with dev/beta/prod env config and uv #6

Merged
westfarn merged 5 commits from feature/4-dockerize-with-env-config into master 2026-07-07 11:23:50 -07:00
2 changed files with 21 additions and 1 deletions
Showing only changes of commit 5899c1f14f - Show all commits
+1 -1
View File
@@ -147,7 +147,7 @@ STATIC_URL = "static/"
STATIC_ROOT = BASE_DIR / "staticfiles"
STORAGES = {
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
"BACKEND": "company_site.storage.TolerantManifestStaticFilesStorage",
},
}
+20
View File
@@ -0,0 +1,20 @@
"""Custom static files storage.
WhiteNoise's manifest storage post-processes JS/CSS during ``collectstatic`` and
strictly resolves every referenced file, including ``sourceMappingURL`` comments
in vendored bundles. Some third-party assets reference ``.map`` files that are
not shipped, which makes ``collectstatic`` fail hard.
``TolerantManifestStaticFilesStorage`` leaves such unresolved references
untouched instead of raising, so a missing source map can't break the build.
"""
from whitenoise.storage import CompressedManifestStaticFilesStorage
class TolerantManifestStaticFilesStorage(CompressedManifestStaticFilesStorage):
def _stored_name(self, name, hashed_files):
try:
return super()._stored_name(name, hashed_files)
except ValueError:
return name