Ongoing changes
This commit is contained in:
22
Containerfile
Normal file
22
Containerfile
Normal 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
|
||||
Reference in New Issue
Block a user