alternative-backend-service/dockerfile
saani c2d6ea04bc chore: switch from gunicorn to Django development server in dockerfile
Replace gunicorn production server with Django's development server
(manage.py runserver) for easier debugging. The gunicorn configuration
has been commented out rather than removed for easy restoration.

**Warning:** This change makes the application unsuitable for production
deployment as runserver is not designed for production use.
2025-11-23 19:19:29 +00:00

34 lines
719 B
Plaintext

FROM python:3.12-slim
# Environment settings
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# System dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl wget \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Expose port
EXPOSE 8000
# Run migrations + collectstatic + gunicorn at runtime
CMD \
python manage.py migrate && \
python manage.py collectstatic --noinput && \
python manage.py runserver 0.0.0.0:8000 && \
# gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3