From a4b80dc16b6211d7b6821a542021b1dcf5aa66ad Mon Sep 17 00:00:00 2001 From: gopigane <92424505+gopigane@users.noreply.github.com> Date: Mon, 6 Jun 2022 11:56:33 +0530 Subject: [PATCH] Update Dockerfile --- Dockerfile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58d0cb4..75f39b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,18 @@ FROM python:2.7 -# Creating Application Source Code Directory + RUN mkdir -p /usr/src/app -# Setting Home Directory for containers + WORKDIR /usr/src/app -# Installing python dependencies + COPY requirements.txt /usr/src/app/ RUN pip install --no-cache-dir -r requirements.txt -# Copying src code to Container -COPY . /usr/src/app - -# Application Environment variables -#ENV APP_ENV development -ENV PORT 8080 -# Exposing Ports -EXPOSE $PORT +COPY . /usr/src/app -# Setting Persistent data -VOLUME ["/app-data"] -# Running Python Application -CMD gunicorn -b :$PORT -c gunicorn.conf.py main:app +EXPOSE 8080 +CMD ["python2","/usr/src/app/main.py"]