optimise versionstring handling (#159)

- Reading the version string from the image updates
  it even if the image is re-pulled without re-deployment
This commit is contained in:
Stefan Allius
2024-08-10 22:53:25 +02:00
committed by GitHub
parent 1e610af1df
commit 33d385db10
3 changed files with 5 additions and 1 deletions

View File

@@ -34,7 +34,6 @@ ARG GID
ARG LOG_LVL
ARG environment
ENV VERSION=$VERSION
ENV SERVICE_NAME=$SERVICE_NAME
ENV UID=$UID
ENV GID=$GID
@@ -63,6 +62,7 @@ RUN python -m pip install --no-cache --no-index /root/wheels/* && \
COPY --chmod=0700 entrypoint.sh /root/entrypoint.sh
COPY config .
COPY src .
RUN echo ${VERSION} > /proxy-version.txt
RUN date > /build-date.txt
EXPOSE 5005 8127 10000

View File

@@ -2,6 +2,8 @@
set -e
user="$(id -u)"
export VERSION=$(cat /proxy-version.txt)
echo "######################################################"
echo "# prepare: '$SERVICE_NAME' Version:$VERSION"
echo "# for running with UserID:$UID, GroupID:$GID"