updated docker build
This commit is contained in:
parent
0a75b962d0
commit
4f15f7751b
2 changed files with 26 additions and 5 deletions
24
Dockerfile
24
Dockerfile
|
@ -1,14 +1,28 @@
|
||||||
FROM python:3.11-slim-bookworm
|
FROM python:3.13-slim-bookworm AS builder
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y wget unzip
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
RUN apt-get update && apt-get install libmagic-dev curl -y
|
# Work around for the unreleased version of PNUTpy
|
||||||
|
RUN wget https://github.com/spacenerdmo/PNUTpy/archive/refs/heads/api_v1.zip
|
||||||
|
RUN unzip api_v1.zip
|
||||||
|
RUN cd PNUTpy-api_v1 && pip wheel . --wheel-dir /wheels --find-links /wheels
|
||||||
|
|
||||||
|
WORKDIR /usr/src/app/pnut-matrix
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
ENV CONFIG_FILE=/data/config.yaml
|
RUN pip wheel . --wheel-dir /wheels --find-links /wheels
|
||||||
|
|
||||||
|
FROM python:3.13-slim-bookworm AS run
|
||||||
|
|
||||||
|
COPY --from=builder /wheels /wheels
|
||||||
|
|
||||||
|
RUN pip --no-cache-dir install --find-links /wheels --no-index pnut-matrix
|
||||||
|
|
||||||
VOLUME /data
|
VOLUME /data
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
CMD [ "python", "/usr/src/app/pnut-matrix.py" ]
|
CMD [ "bash", "/usr/src/app/run.sh" ]
|
||||||
|
|
7
run.sh
Executable file
7
run.sh
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
!#/bin/bash
|
||||||
|
|
||||||
|
pnutservice -c /data/config.yml &
|
||||||
|
matrixappsvc -c /data/config.yml &
|
||||||
|
wait -n
|
||||||
|
|
||||||
|
exit $?
|
Loading…
Reference in a new issue