paulo@131: # Use the official lightweight Python image. paulo@131: # https://hub.docker.com/_/python paulo@131: FROM python:3.6-slim paulo@131: paulo@131: # Copy local code to the container image. paulo@131: ENV APP_HOME /app paulo@131: WORKDIR $APP_HOME paulo@131: COPY . ./ paulo@131: paulo@131: # Install production dependencies. paulo@131: RUN pip install -r requirements.pip paulo@131: paulo@131: # Run the web service on container startup. Here we use the gunicorn paulo@131: # webserver, with one worker process and 8 threads. paulo@131: # For environments with multiple CPU cores, increase the number of workers paulo@131: # to be equal to the cores available. paulo@131: CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 cs_flask_app:app