feat: add basic production Dockerfiles

closes #8
This commit is contained in:
Felix Spöttel
2023-02-28 20:22:58 +01:00
parent 4eed77bfa7
commit 74879df442
9 changed files with 140 additions and 20 deletions

View File

@@ -1,13 +1,11 @@
FROM python:3.10 AS compile-image
FROM python:3.10
WORKDIR /code
ENV PYTHONIOENCODING=utf-8
ENV PATH=/root/.local/bin:$PATH
COPY pyproject.toml .
RUN pip install --no-cache-dir --user .[web]
ENV PYTHONIOENCODING=utf-8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PATH=/root/.local/bin:$PATH
CMD alembic upgrade head && uvicorn app.web.main:app --reload --host ${HOST:-0.0.0.0} --port ${PORT:-80} --log-level info