File size: 717 Bytes
16bfc87 21e0318 16bfc87 21e0318 16bfc87 21e0318 16bfc87 21e0318 16bfc87 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
FROM python:3.8-slim-buster
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PORT=7860 \
DATABASE_URL=sqlite:////data/db.sqlite3
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
python3-dev \
curl \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /data /static \
&& chmod 777 /data /static
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Build-time static collection with dummy settings
RUN python manage.py collectstatic --noinput --settings=dtb.settings_build
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"] |