Dockerfile 470 B

123456789101112131415161718192021222324
  1. FROM python:3.10
  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. RUN pip install garmindb --upgrade
  12. COPY env.sample .env
  13. COPY . .
  14. RUN flask db init
  15. RUN flask db migrate
  16. RUN flask db upgrade
  17. # gunicorn
  18. CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]