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"]