Skip to content

Commit

Permalink
use better copy on backend/Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
allgood committed Aug 6, 2024
1 parent bd06aa4 commit 1558754
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# syntax=docker/dockerfile:1.7-labs

# Stage 1: Build the application
FROM node:20 AS build

Expand All @@ -13,9 +15,11 @@ FROM ghcr.io/ticketz-oss/node
WORKDIR /usr/src/app

# Copy only the necessary build artifacts from the build stage
COPY --from=build /usr/src/app/dist ./dist
COPY --from=build /usr/src/app/node_modules ./node_modules
COPY --from=build /usr/src/app/package.json ./package.json
COPY --from=build --parents \
/usr/src/app/./dist \
/usr/src/app/./node_modules \
/usr/src/app/./package.json \
.

ENV NODE_ENV=production
ENV PORT=3000
Expand Down

0 comments on commit 1558754

Please sign in to comment.