vivek1192 commited on
Commit
485075a
·
1 Parent(s): 3e4fba9

Add collectstatic

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -2
Dockerfile CHANGED
@@ -35,10 +35,12 @@ ENV PYTHONDONTWRITEBYTECODE=1
35
  ENV PYTHONUNBUFFERED=1
36
  ENV DJANGO_SETTINGS_MODULE=detect_backend.settings
37
 
 
 
 
 
38
  # Expose Port
39
  EXPOSE 7860
40
 
41
  # Run Gunicorn
42
- # Hugging Face expects server on port 7860
43
- WORKDIR /app/backend
44
  CMD ["gunicorn", "detect_backend.wsgi:application", "--bind", "0.0.0.0:7860"]
 
35
  ENV PYTHONUNBUFFERED=1
36
  ENV DJANGO_SETTINGS_MODULE=detect_backend.settings
37
 
38
+ # Run collectstatic to prepare static files for WhiteNoise
39
+ WORKDIR /app/backend
40
+ RUN python manage.py collectstatic --noinput
41
+
42
  # Expose Port
43
  EXPOSE 7860
44
 
45
  # Run Gunicorn
 
 
46
  CMD ["gunicorn", "detect_backend.wsgi:application", "--bind", "0.0.0.0:7860"]