From 72c8c1be83b7b6c43ce9ad79c07a246d938dd5f8 Mon Sep 17 00:00:00 2001 From: Jan Dahms Date: Sun, 29 Aug 2021 18:29:43 +0200 Subject: [PATCH] Use exec to forward signals like SIGTERM to gunicorn Otherwise the container cannot be shutdown orderly and will be killed after a 10sec timeout --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 48e0332a..c3443ad9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,5 +35,5 @@ ENV WORKER_COUNT=4 HEALTHCHECK --interval=2s --timeout=2s --retries=5 --start-period=2s CMD curl --fail http://localhost:8080/health || exit 1 -CMD gunicorn -w $WORKER_COUNT -b 0.0.0.0:8080 pdf_service:pdf_service +CMD exec gunicorn -w $WORKER_COUNT -b 0.0.0.0:8080 pdf_service:pdf_service EXPOSE 8080