Dockerfile 435 B

123456789101112131415161718192021222324
  1. FROM python:3.9
  2. # set environment variables
  3. ENV PYTHONDONTWRITEBYTECODE 1
  4. ENV PYTHONUNBUFFERED 1
  5. ENV FLASK_APP run.py
  6. ENV DEBUG True
  7. COPY requirements.txt .
  8. # install python dependencies
  9. RUN pip install --upgrade pip
  10. RUN pip install --no-cache-dir -r requirements.txt
  11. COPY env.sample .env
  12. COPY . .
  13. RUN flask db init
  14. RUN flask db migrate
  15. RUN flask db upgrade
  16. # gunicorn
  17. CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]