New docker entrypoint
This commit is contained in:
@@ -11,6 +11,9 @@ RUN pip install --no-cache-dir -r requirements_prod.txt
|
||||
#COPY server/py/fastapi_server/ ./
|
||||
COPY ./server/py/fastapi_server/*.py ./
|
||||
|
||||
# Copy the entrypoint to root
|
||||
COPY ./server/py/fastapi_server/entrypoint.sh /
|
||||
|
||||
ENV PORT=8000
|
||||
ENV HOST=0.0.0.0
|
||||
ENV DOWNLOAD_FOLDER=/tmp/downloads
|
||||
@@ -22,4 +25,6 @@ ENV ROOT_PATH=/
|
||||
|
||||
VOLUME ["/tmp/downloads"]
|
||||
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["python3", "main.py"]
|
||||
|
||||
6
server/py/fastapi_server/entrypoint.sh
Normal file
6
server/py/fastapi_server/entrypoint.sh
Normal 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 "$@"
|
||||
Reference in New Issue
Block a user