Skip to content

Commit

Permalink
chore: update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Oct 28, 2024
1 parent fef10f6 commit bd2d8ee
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Dockerfile.website
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

FROM base AS build
COPY . /usr/src/app
WORKDIR /usr/src/app
WORKDIR /app
COPY . .


# Install dependencies
Expand All @@ -16,7 +16,6 @@ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
ENV NODE_ENV=production
RUN pnpm run build

RUN cp -R /usr/src/app/.next .next

FROM base AS dokploy
WORKDIR /app
Expand All @@ -25,10 +24,10 @@ WORKDIR /app
ENV NODE_ENV=production

# Copy only the necessary files
COPY --from=build /usr/src/app/.next ./.next
COPY --from=build /usr/src/app/public ./public
COPY --from=build /usr/src/app/package.json ./package.json
COPY --from=build /usr/src/app/node_modules ./node_modules
COPY --from=build /app/.next ./.next
COPY --from=build /app/public ./public
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/node_modules ./node_modules


EXPOSE 3000
Expand Down

0 comments on commit bd2d8ee

Please sign in to comment.