mirror of
https://github.com/Andre-Bzk/Rezept0r.git
synced 2026-11-15 09:33:05 +01:00
fix: Stack-Umgebungsvariablen via environment: an Container weitergeben
feat: entrypoint.sh mit gosu für automatisches chown und Privilege-Drop
This commit is contained in:
+6
-1
@@ -4,6 +4,7 @@ FROM python:3.12-slim-bookworm
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg \
|
||||
curl \
|
||||
gosu \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install yt-dlp (standalone binary, always up-to-date)
|
||||
@@ -18,7 +19,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p /app/tmp
|
||||
RUN mkdir -p /app/tmp /app/data
|
||||
|
||||
ENV APP_HOST=0.0.0.0
|
||||
ENV APP_PORT=8000
|
||||
@@ -26,5 +27,9 @@ ENV TMP_DIR=/app/tmp
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
# Single worker to stay within Pi 3's memory budget
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "1"]
|
||||
|
||||
Reference in New Issue
Block a user