mirror of
https://github.com/interfacerproject/zenflows-fabaccess.git
synced 2025-03-12 15:01:44 +01:00
add Dockerfile
This uses Python version 3.11 with Debian slim-bullseye (11). I tried for a quite while to build it on Alpine, but Zenroom bindings fail to work no matter what I do It uses Uvicorn that listens on TCP over IPv4 using port 8000. A process manager such as Gunicorn was excluded for simplicity and can be used separetely, or orchestration can be used instead.
This commit is contained in:
parent
e74b2ed725
commit
62f0aa1a30
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
ARG PYVER=3.11 DEBVER=slim-bullseye
|
||||||
|
|
||||||
|
|
||||||
|
FROM python:$PYVER-$DEBVER
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ARG USER=app
|
||||||
|
ARG GROUP=$USER
|
||||||
|
RUN addgroup --system "$GROUP" && adduser --system --ingroup "$GROUP" "$USER"
|
||||||
|
|
||||||
|
COPY --chown=$USER:$GROUP requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
||||||
|
|
||||||
|
USER $USER:$GROUP
|
||||||
|
COPY --chown=$USER:$GROUP . .
|
||||||
|
|
||||||
|
EXPOSE 8000
|
||||||
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
Loading…
x
Reference in New Issue
Block a user