From 83e3b52be6719802872fcfd27ee63240f45a01bd Mon Sep 17 00:00:00 2001 From: Loudbook Date: Fri, 6 Dec 2024 12:33:16 -0500 Subject: [PATCH] Reorganize Dockerfile --- frontend/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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