Dockerfile 701 B

123456789101112131415161718192021222324
  1. # Using official python runtime base image
  2. FROM python:3.9-slim
  3. # add curl for healthcheck
  4. RUN apt-get update \
  5. && apt-get install -y --no-install-recommends \
  6. curl \
  7. && rm -rf /var/lib/apt/lists/*
  8. # Set the application directory
  9. WORKDIR /app
  10. # Install our requirements.txt
  11. COPY requirements.txt /app/requirements.txt
  12. RUN pip install -r requirements.txt
  13. # Copy our code from the current folder to /app inside the container
  14. COPY . .
  15. # Make port 80 available for links and/or publish
  16. EXPOSE 80
  17. # Define our command to be run when launching the container
  18. CMD ["gunicorn", "app:app", "-b", "0.0.0.0:80", "--log-file", "-", "--access-logfile", "-", "--workers", "4", "--keep-alive", "0"]