diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 1838134..5bf26a1 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,6 +2,11 @@ FROM node:23-alpine AS build WORKDIR /pastebook-frontend +ARG COMMIT_HASH +ENV VITE_COMMIT_HASH=$COMMIT_HASH + +RUN echo "VITE_COMMIT_HASH=$VITE_COMMIT_HASH" >> .env + COPY package*.json ./ RUN npm install COPY . . @@ -15,9 +20,6 @@ COPY --from=build /pastebook-frontend /pastebook-frontend RUN npm install --production -ARG COMMIT_HASH -ENV VITE_COMMIT_HASH=$COMMIT_HASH - EXPOSE 3000 CMD ["node", "build"] \ No newline at end of file