Skip to content

Commit

Permalink
Reorganize Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Loudbooks committed Dec 6, 2024
1 parent 14856d9 commit 83e3b52
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 . .
Expand All @@ -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"]

0 comments on commit 83e3b52

Please sign in to comment.