docker.py 526 B

1234567891011
  1. import os
  2. if IN_DOCKER or os.path.isfile('/.dockerenv'): # type: ignore # noqa: F821
  3. print("IN DOCKER")
  4. # We need it to serve static files with DEBUG=False
  5. assert MIDDLEWARE[:1] == [ # type: ignore # noqa: F821
  6. 'django.middleware.security.SecurityMiddleware'
  7. ]
  8. MIDDLEWARE.insert(1, 'whitenoise.middleware.WhiteNoiseMiddleware') # type: ignore # noqa: F821
  9. DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
  10. STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'