From 2b44c122e787116a9a0a8a54e71067ed3e17c26c Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 30 Apr 2025 18:46:10 -0500 Subject: [PATCH 1/4] Update version display to include timestamp instead of build --- docker/entrypoint.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 478d94d0..d2afb3a3 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -40,8 +40,14 @@ export DISPATCHARR_PORT=${DISPATCHARR_PORT:-9191} # Extract version information from version.py export DISPATCHARR_VERSION=$(python -c "import sys; sys.path.append('/app'); import version; print(version.__version__)") -export DISPATCHARR_BUILD=$(python -c "import sys; sys.path.append('/app'); import version; print(version.__build__)") -echo "📦 Dispatcharr version: ${DISPATCHARR_VERSION}-${DISPATCHARR_BUILD}" +export DISPATCHARR_TIMESTAMP=$(python -c "import sys; sys.path.append('/app'); import version; print(version.__timestamp__ or '')") + +# Display version information with timestamp if available +if [ -n "$DISPATCHARR_TIMESTAMP" ]; then + echo "📦 Dispatcharr version: ${DISPATCHARR_VERSION} (build: ${DISPATCHARR_TIMESTAMP})" +else + echo "📦 Dispatcharr version: ${DISPATCHARR_VERSION}" +fi # READ-ONLY - don't let users change these export POSTGRES_DIR=/data/db @@ -64,7 +70,7 @@ if [[ ! -f /etc/profile.d/dispatcharr.sh ]]; then echo "export POSTGRES_DIR=$POSTGRES_DIR" >> /etc/profile.d/dispatcharr.sh echo "export DISPATCHARR_PORT=$DISPATCHARR_PORT" >> /etc/profile.d/dispatcharr.sh echo "export DISPATCHARR_VERSION=$DISPATCHARR_VERSION" >> /etc/profile.d/dispatcharr.sh - echo "export DISPATCHARR_BUILD=$DISPATCHARR_BUILD" >> /etc/profile.d/dispatcharr.sh + echo "export DISPATCHARR_TIMESTAMP=$DISPATCHARR_TIMESTAMP" >> /etc/profile.d/dispatcharr.sh fi chmod +x /etc/profile.d/dispatcharr.sh From 3381cb8695708b66ccc8b18f60fe7e8e75997af4 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 30 Apr 2025 19:14:18 -0500 Subject: [PATCH 2/4] Switch to yarn for building frontend. --- docker/Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 4d313e2c..f145fe2e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -44,8 +44,9 @@ RUN cd /app && \ FROM node:20-slim AS frontend-builder WORKDIR /app/frontend COPY --from=builder /app /app -RUN npm install --legacy-peer-deps && \ - npm run build && \ +RUN corepack enable && corepack prepare yarn@stable --activate && \ + yarn install && \ + yarn build && \ find . -maxdepth 1 ! -name '.' ! -name 'dist' -exec rm -rf '{}' \; FROM python:3.13-slim From 7a67479e387fe39c07459ebb81677678dfbf4c3c Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 30 Apr 2025 19:21:22 -0500 Subject: [PATCH 3/4] Back to NPM but use ignore scripts and rebuild. --- docker/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f145fe2e..f73cfb84 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -44,9 +44,9 @@ RUN cd /app && \ FROM node:20-slim AS frontend-builder WORKDIR /app/frontend COPY --from=builder /app /app -RUN corepack enable && corepack prepare yarn@stable --activate && \ - yarn install && \ - yarn build && \ +RUN npm install --ignore-scripts && \ + npm rebuild && \ + npm run build && \ find . -maxdepth 1 ! -name '.' ! -name 'dist' -exec rm -rf '{}' \; FROM python:3.13-slim From e975a13c0f5cc9d9661417a3cdd1f74e7f7a6c71 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 30 Apr 2025 19:30:53 -0500 Subject: [PATCH 4/4] Another attempt at using yarn. --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f73cfb84..26b54975 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -41,12 +41,12 @@ RUN cd /app && \ pip install --no-cache-dir -r requirements.txt # Use a dedicated Node.js stage for frontend building -FROM node:20-slim AS frontend-builder +FROM node:20 AS frontend-builder WORKDIR /app/frontend COPY --from=builder /app /app -RUN npm install --ignore-scripts && \ - npm rebuild && \ - npm run build && \ +RUN corepack enable && corepack prepare yarn@stable --activate && \ + yarn install && \ + yarn build && \ find . -maxdepth 1 ! -name '.' ! -name 'dist' -exec rm -rf '{}' \; FROM python:3.13-slim