Dockerize the full stack so developers can run everything with `docker compose up`. Replaces the outdated Dockerfile and docker-compose.yml with a working 6-service setup: PostgreSQL, Redis, Django backend, Celery worker, Celery beat, and SvelteKit frontend. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
675 B
Docker
27 lines
675 B
Docker
FROM python:3.12-slim-bookworm
|
|
|
|
# Prevent Python from buffering stdout/stderr (useful for Docker logs)
|
|
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
PYTHONUNBUFFERED=1
|
|
|
|
# Install system dependencies for WeasyPrint (cairo, pango) and PostgreSQL
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpq-dev \
|
|
libcairo2 \
|
|
libpango-1.0-0 \
|
|
libpangocairo-1.0-0 \
|
|
libgdk-pixbuf2.0-0 \
|
|
libffi-dev \
|
|
shared-mime-info \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python dependencies (layer cached)
|
|
COPY backend/requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy backend source
|
|
COPY backend/ .
|
|
|
|
EXPOSE 8000
|