improve Dockerfile to use entrypoint in order to get better log when receive any request

This commit is contained in:
seavphing 2024-10-16 22:35:07 +07:00
parent 8b654f8cc4
commit 95ebe372df
2 changed files with 3 additions and 1 deletions

View File

@ -55,4 +55,5 @@ ENV PYTHONUNBUFFERED=1
# run the app (re-configure port if necessary)
WORKDIR /app/deepface/api/src
EXPOSE 5000
CMD ["gunicorn", "--workers=1", "--timeout=3600", "--bind=0.0.0.0:5000", "app:create_app()"]
# CMD ["gunicorn", "--workers=1", "--timeout=3600", "--bind=0.0.0.0:5000", "app:create_app()"]
ENTRYPOINT [ "sh", "entrypoint.sh" ]

1
entrypoint.sh Normal file
View File

@ -0,0 +1 @@
gunicorn -w 1 -b 0.0.0.0:5000 --timeout 7200 --log-level 'debug' --access-logfile - --access-logformat '%(h)s - - [%(t)s] "%(r)s" %(s)s %(b)s %(L)s' app:create_app()