Ongoing changes

This commit is contained in:
2023-08-07 23:20:09 +02:00
parent 0045cccf2c
commit fb62de649c
9 changed files with 798 additions and 1087 deletions

22
Containerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM python:3.11-alpine AS base
WORKDIR /app
ENV PATH="/root/.local/bin:${PATH}"
RUN apk add --no-cache --virtual .build-deps build-base curl libffi-dev \
&& curl -sSL https://install.python-poetry.org | python3 - \
&& poetry config virtualenvs.create false \
&& apk del .build-deps
ADD pyproject.toml poetry.lock ./
RUN poetry install --no-dev
FROM base as dev
CMD [ "uvicorn", "projectorpi_web.app:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
FROM base as prod
ADD projectorpi_web/* ./
CMD gunicorn -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000 app:app