Skip to content

Commit 71654b1

Browse files
committed
Fix Docker collectstatic error
- Add STATIC_ROOT setting to Django configuration - Update .dockerignore to allow staticfiles directory - Ensure collectstatic works properly in Docker build - Resolves ImproperlyConfigured error during image build
1 parent c58f423 commit 71654b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
# https://docs.djangoproject.com/en/4.2/howto/static-files/
141141

142142
STATIC_URL = "static/"
143+
STATIC_ROOT = BASE_DIR / "staticfiles"
143144

144145
# Default primary key field type
145146
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field

0 commit comments

Comments
 (0)