Compare commits

..

No commits in common. "cfed3ebaa762ae2b1993634711512816dd1f2407" and "fdb8dde94ff3edb2eb01a9d389486c20c35fdf5e" have entirely different histories.

View File

@ -1,24 +1,33 @@
FROM python:3.12-slim FROM python:3.12-slim
# Environment settings
ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app WORKDIR /app
# System dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
build-essential \ build-essential \
curl wget \ curl wget \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
# Copy dependency file
COPY requirements.txt . COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . . COPY . .
# Expose port
EXPOSE 8000 EXPOSE 8000
CMD bash -c " # Run migrations + collectstatic + gunicorn at runtime
python manage.py migrate && CMD \
python manage.py collectstatic --noinput && python manage.py migrate && \
python manage.py runserver 0.0.0.0:8000 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