Docker file fix and version in docker return proper envvar

This commit is contained in:
2026-07-17 13:43:31 +02:00
parent b7c6c5df7b
commit d74fd3a248
2 changed files with 5 additions and 5 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
FROM node:23-alpine3.21
FROM node:24-alpine
RUN apk upgrade --update-cache --available
ARG VERSION
LABEL version=${VERSION}} description="BadgeDex"
LABEL version=${VERSION} description="BadgeDex"
ENV APP_VERSION=${VERSION}
# Create a group and user && Create directory for files
@@ -18,7 +18,7 @@ USER badgedex
COPY --chown=badgedex:badgedex . .
#Install dependencies
RUN npm install
RUN npm ci --only=production
# Expose API port
EXPOSE 3000
+2 -2
View File
@@ -2,8 +2,8 @@ const fs = require('fs');
const version = () => {
if (process.env.VERSION) {
return process.env.VERSION;
if (process.env.APP_VERSION) {
return process.env.APP_VERSION;
}
// Fallback to reading from a VERSION file
const versionPath = require('path').resolve(__dirname, '../../VERSION');