From 2df8fefd480d1e16636bb074d44d3bd165da53e0 Mon Sep 17 00:00:00 2001 From: facundo Date: Sun, 14 Jul 2024 14:25:37 -0300 Subject: [PATCH] allow environment override in dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8903d6e..66149bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,4 +25,7 @@ COPY . . EXPOSE 9988 -CMD [ "gunicorn", "-b0.0.0.0:9988", "--env", "FLASK_ENV=development"] +# run in dev by default, override with docker run -e FLASK_ENV=production +ENV FLASK_ENV=development + +CMD ["sh", "-c", "gunicorn -b 0.0.0.0:9988 --env FLASK_ENV=${FLASK_ENV}"]