Dockerfile43 lines · 1176 chars # Taiga backend Dockerfile
# Builds the Taiga Django backend from source using Python 3.12
FROM python:3.12.13-bookworm
# Environment optimizations
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
# Install system dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
libpq-dev \
libffi-dev \
libssl-dev \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Working directory inside the image
WORKDIR /taiga-back
# Build tooling
RUN pip install --no-cache-dir -U pip setuptools wheel
# Copy the project source
COPY . .
# Install dependencies if a requirements.txt is present
RUN if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
# Install the package in editable mode if packaging is available
RUN pip install --no-cache-dir -e . || true
# Install Gunicorn for production serving
RUN pip install --no-cache-dir gunicorn
# Expose the default Taiga backend port
EXPOSE 8000
# Start the Django application using Gunicorn for production-like behavior
CMD ["gunicorn", "taiga.wsgi:application", "--bind", "0.0.0.0:8000", "--workers", "3"]