Redact sensitive AWS keys in backend/.env.example and add VITE_TURNSTILE_SITE_KEY and VITE_USE_TURNSTILE to frontend/.env.example. Optimize backend Dockerfile by installing Python requirements immediately after copying requirements.txt (enables Docker cache) and remove the duplicate later install. Update turnstile verification to skip checks when USE_SSL is disabled (dev/non-HTTPS) and keep the existing no-secret bypass; add debug logging for the SSL bypass.
32 lines
884 B
Docker
32 lines
884 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies including Node.js for yt-dlp JavaScript runtime
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
weasyprint \
|
|
libcairo2 \
|
|
libpango-1.0-0 \
|
|
libgobject-2.0-0 \
|
|
ffmpeg \
|
|
ca-certificates \
|
|
curl \
|
|
libmagic1 \
|
|
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
|
&& apt-get install -y --no-install-recommends nodejs \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
# Trust Windows/corporate root CAs if present (optional, no-op when certs/ is absent)
|
|
RUN test -f certs/windows-ca-bundle.crt \
|
|
&& install -m 644 certs/windows-ca-bundle.crt /usr/local/share/ca-certificates/windows-ca-bundle.crt \
|
|
&& update-ca-certificates \
|
|
|| true
|
|
|
|
EXPOSE 8000
|