Dockerfile 735 B

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