Mercurial > hg > index.fcgi > www > www-1
annotate myrss2/Dockerfile @ 132:99e4022eae52
pics3: add Dockerfile and requirements.pip
author | paulo |
---|---|
date | Thu, 20 Jan 2022 01:28:46 -0800 |
parents | |
children |
rev | line source |
---|---|
paulo@108 | 1 # Use the official lightweight Python image. |
paulo@108 | 2 # https://hub.docker.com/_/python |
paulo@108 | 3 FROM python:3.6-slim |
paulo@108 | 4 |
paulo@108 | 5 # Copy local code to the container image. |
paulo@108 | 6 ENV APP_HOME /app |
paulo@108 | 7 WORKDIR $APP_HOME |
paulo@108 | 8 COPY . ./ |
paulo@108 | 9 |
paulo@108 | 10 # Install production dependencies. |
paulo@108 | 11 RUN pip install -r requirements.pip |
paulo@108 | 12 |
paulo@108 | 13 # Run the web service on container startup. Here we use the gunicorn |
paulo@108 | 14 # webserver, with one worker process and 8 threads. |
paulo@108 | 15 # For environments with multiple CPU cores, increase the number of workers |
paulo@108 | 16 # to be equal to the cores available. |
paulo@108 | 17 CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 myrss_flask:flask_app |