alternative-backend-service/dockerfile
saani c5cdc5d774 refactor(docker): clean up dockerfile and improve CMD syntax
- Remove redundant inline comments for better readability
- Replace backslash line continuation with bash -c for CMD instruction
- Remove commented out gunicorn configuration line
- Improve CMD formatting using proper bash string syntax

These changes make the dockerfile cleaner and more maintainable while
preserving the same functionality (migrate, collectstatic, runserver).
2025-11-23 19:23:58 +00:00

24 lines
440 B
Plaintext

FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
RUN apt-get update && apt-get install -y \
build-essential \
curl wget \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD bash -c "
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000
"