New docker entrypoint

This commit is contained in:
2026-01-30 10:48:40 +00:00
parent 4ec441e688
commit 61233b3611
2 changed files with 11 additions and 0 deletions

View File

@@ -11,6 +11,9 @@ RUN pip install --no-cache-dir -r requirements_prod.txt
#COPY server/py/fastapi_server/ ./ #COPY server/py/fastapi_server/ ./
COPY ./server/py/fastapi_server/*.py ./ COPY ./server/py/fastapi_server/*.py ./
# Copy the entrypoint to root
COPY ./server/py/fastapi_server/entrypoint.sh /
ENV PORT=8000 ENV PORT=8000
ENV HOST=0.0.0.0 ENV HOST=0.0.0.0
ENV DOWNLOAD_FOLDER=/tmp/downloads ENV DOWNLOAD_FOLDER=/tmp/downloads
@@ -22,4 +25,6 @@ ENV ROOT_PATH=/
VOLUME ["/tmp/downloads"] VOLUME ["/tmp/downloads"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["python3", "main.py"] CMD ["python3", "main.py"]

View File

@@ -0,0 +1,6 @@
#!/bin/sh
# make sure it remains updated (don't crash if fails)
/usr/local/bin/pip install -U --no-cache-dir "yt-dlp[default]" || true
exec "$@"