diff --git a/Dockerfile b/Dockerfile index 8a80588..21bb2c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,21 @@ -FROM node:18-alpine +FROM node:20-alpine -# Build arguments - Coolify provides SOURCE_COMMIT automatically ARG SOURCE_COMMIT=unknown ARG APP_VERSION=1.0.0 WORKDIR /app -# Install curl for healthcheck and git for version control operations -RUN apk add --no-cache curl git +# Install curl for healthcheck +RUN apk add --no-cache curl # Copy package files first for layer caching COPY package*.json ./ RUN npm install --production -# Copy app code (changes more often — below the cached layer) +# Copy app code COPY . . -# Set environment variables for runtime -# Extract first 7 characters of SOURCE_COMMIT for short hash -ENV GIT_COMMIT=${SOURCE_COMMIT:0:7} \ +ENV GIT_COMMIT=${SOURCE_COMMIT} \ APP_VERSION=${APP_VERSION} EXPOSE 3000