From 3f046e333c8cbde26d9c71513204491cdb155890 Mon Sep 17 00:00:00 2001 From: Jeremiah K <17190268+jeremiah-k@users.noreply.github.com> Date: Wed, 25 Oct 2023 12:16:16 -0500 Subject: [PATCH] Move to entrypoint.sh script --- app/Dockerfile | 5 +++-- app/entrypoint.sh | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100755 app/entrypoint.sh diff --git a/app/Dockerfile b/app/Dockerfile index ddc08fd..b60b74b 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -1,13 +1,14 @@ FROM python:3.11-slim-bookworm AS app LABEL "website"="https://github.com/mate-dev/mmrelaynode" RUN groupadd -g 1000 mesh && useradd -ml -u 1000 -g 1000 -s /bin/bash mesh +RUN echo "export PATH=/home/mesh/.local/bin:\$PATH" >> /home/mesh/.bashrc RUN pip install --upgrade pip -qq RUN ln -s /home/mesh/.local/bin/meshtastic /bin/meshtastic USER mesh COPY --chown=mesh:mesh meshtastic-matrix-relay /home/mesh/app +COPY --chown=mesh:mesh --chmod=744 entrypoint.sh /usr/local/bin/entrypoint.sh COPY --chown=mesh:mesh --chmod=744 wait-for-it.sh /home/mesh/.local/bin/wait-for-it.sh COPY --chown=mesh:mesh conf_wrapper.py /home/mesh/app/ COPY --chown=mesh:mesh command_wrapper.py /home/mesh/app/ WORKDIR /home/mesh/app -RUN pip install -qq -r /home/mesh/app/requirements.txt --no-cache-dir -RUN echo "export PATH=/home/mesh/.local/bin:\$PATH" >> /home/mesh/.bashrc \ No newline at end of file +RUN pip install -qq -r /home/mesh/app/requirements.txt --no-cache-dir \ No newline at end of file diff --git a/app/entrypoint.sh b/app/entrypoint.sh new file mode 100755 index 0000000..60b5214 --- /dev/null +++ b/app/entrypoint.sh @@ -0,0 +1,5 @@ +#!/bin/bash +/home/mesh/.local/bin/wait-for-it.sh mmrelaynode:4403 -t 60 +python3 command_wrapper.py +python3 conf_wrapper.py +python3 main.py \ No newline at end of file