title: Django stops serving static files when DEBUG is False
body: <p>I use Docker Compose along with this Dockerfile that copies the static folder into /static:</p>
  
  <pre><code>FROM python:3
  ENV PYTHONUNBUFFERED 1
  RUN mkdir /code
  WORKDIR /code
  COPY requirements.txt /code/
  RUN pip install --upgrade pip &amp;&amp; pip install -r requirements.txt
  COPY static /static/
  COPY . /code/
  </code></pre>
  
  <p>And in my settings files I use:</p>
  
  <pre><code>if env == "dev":
      DEBUG = True
  else:
      DEBUG = False
      SECURE_CONTENT_TYPE_NOSNIFF = True
      SECURE_BROWSER_XSS_FILTER = True
      X_FRAME_OPTIONS = "DENY"
  
  STATICFILES_FINDERS = [
      'django.contrib.staticfiles.finders.FileSystemFinder',
      'django.contrib.staticfiles.finders.AppDirectoriesFinder',
  ]
  
  STATICFILES_DIRS = [
      # os.path.join(BASE_DIR, "static/"),
      '/static'
  ]
  
  STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
  STATIC_URL = '/static/'
  </code></pre>
  
  <p>The static files are working in dev but when I change the env to prod, I start getting 404 errors.</p>
  
  <p>So you see the problem ?</p>