Spaces:
Sleeping
Sleeping
File size: 486 Bytes
e7b5120 376edbc e7b5120 376edbc e7b5120 376edbc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | FROM python:3.10
WORKDIR /code
COPY . .
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Set a default secret key for collectstatic (overridden by env var at runtime)
ENV SECRET_KEY=build-time-placeholder
ENV DJANGO_SETTINGS_MODULE=config.settings
RUN python manage.py collectstatic --noinput
RUN python manage.py migrate --noinput || true
EXPOSE 7860
CMD ["gunicorn", "config.wsgi:application", "--bind", "0.0.0.0:7860", "--workers", "2", "--timeout", "120"]
|