Install czkawka via download in dockerfile + fix uvicorn dependency
All checks were successful
gitea/file-organizer/pipeline/head This commit looks good

This commit is contained in:
Jose134 2025-02-02 01:43:43 +01:00
parent 8ab7746a3f
commit bc60a1ecb7
3 changed files with 8 additions and 11 deletions

4
.gitignore vendored
View File

@ -160,7 +160,3 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ #.idea/
vendor/czkawka/*
vendor/ffmpeg/*

View File

@ -16,14 +16,13 @@ RUN pip install gunicorn
# Copy the FastAPI project files into the container # Copy the FastAPI project files into the container
COPY . . COPY . .
# Copy the czkawka binary into the container # Install binary dependencies
COPY vendor/czkawka /bin/ RUN apt-get update && apt-get install -y wget ffmpeg
RUN wget -O /usr/local/bin/czkawka https://github.com/qarmin/czkawka/releases/download/8.0.0/linux_czkawka_cli
# Install ffmpeg with ffprobe RUN chmod +x /usr/local/bin/czkawka
RUN apt-get update && apt-get install -y ffmpeg
# Expose the port the app runs on # Expose the port the app runs on
EXPOSE 8000 EXPOSE 8000
# Command to run the FastAPI app using gunicorn with uvicorn workers # Command to run the FastAPI app using gunicorn with uvicorn workers
CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "main:app", "--bind", "0.0.0.0:8000"] CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "src.main:app", "--bind", "0.0.0.0:8000"]

View File

@ -1,3 +1,5 @@
requests requests
python-dotenv
fastapi fastapi
uvicorn
pytest ; extra == 'dev' pytest ; extra == 'dev'