-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 734 Bytes
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 734 Bytes
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
# Use official Python image
FROM python:3.13-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Install system dependencies (for poppler + Django needs)
RUN apt-get update && apt-get install -y \
build-essential \
libpoppler-cpp-dev \
poppler-utils \
&& rm -rf /var/lib/apt/lists/*
# Create working directory
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Expose port for Django
EXPOSE 8000
# Run migrations and start server
CMD ["sh", "-c", "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn library.wsgi:application --bind 0.0.0.0:8000"]