- Remove dead kitchen->KDS internal API (api/internal.py, verify_internal_secret) — KDS reads kitchen_db directly (E16), nothing ever called this endpoint - Add expires_at to dispute_attachments; public attachment links now expire after 30 days instead of staying valid forever (A4) - Add services/upload_validation.py: sniff real file content via python-magic instead of trusting the client-supplied Content-Type header, plus a 20MB cap. Applied across invoices/logbook/food_flags/credit_notes/disputes upload endpoints (A5) — disputes previously had no file-type check at all - Fix nginx client_max_body_size drift (800m -> the plan's intended 20m) Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
35 lines
1,005 B
Docker
35 lines
1,005 B
Docker
FROM python:3.11-slim
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
|
ENV PYTHONUNBUFFERED=1
|
|
|
|
# ODBC drivers for SambaPOS MSSQL connection + pg client for backup/restore
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
curl \
|
|
gnupg \
|
|
unixodbc \
|
|
unixodbc-dev \
|
|
postgresql-client \
|
|
libmagic1 \
|
|
&& curl -fsSL https://packages.microsoft.com/keys/microsoft.asc \
|
|
| gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg \
|
|
&& curl -fsSL https://packages.microsoft.com/config/debian/12/prod.list \
|
|
| tee /etc/apt/sources.list.d/mssql-release.list \
|
|
&& apt-get update \
|
|
&& ACCEPT_EULA=Y apt-get install -y --no-install-recommends msodbcsql17 \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir --upgrade pip && \
|
|
pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p /app/data
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|