6d5660b20d
- Pin tailwindcss@3 in client Dockerfile (v4 removed standalone CLI) - Replace gunicorn --factory with callable syntax app:create_app() - Fix Alembic config path with -c flag and %(here)s script_location Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
677 B
Docker
27 lines
677 B
Docker
FROM python:3.11-slim
|
|
|
|
# Installa dipendenze sistema per WeasyPrint
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpango-1.0-0 \
|
|
libpangocairo-1.0-0 \
|
|
libcairo2 \
|
|
libgdk-pixbuf-2.0-0 \
|
|
libffi-dev \
|
|
shared-mime-info \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
# Crea directory uploads
|
|
RUN mkdir -p uploads/images uploads/pdfs uploads/logos uploads/reports
|
|
|
|
EXPOSE 8000
|
|
|
|
# Entry point: Alembic upgrade + Uvicorn
|
|
CMD ["sh", "-c", "alembic -c migrations/alembic.ini upgrade head && uvicorn main:app --host 0.0.0.0 --port 8000 --workers 2"]
|