Skip to content

Commit

Permalink
allow environment override in dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
facundoolano committed Jul 14, 2024
1 parent b22ef89 commit 2df8fef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]

0 comments on commit 2df8fef

Please sign in to comment.