Skip to content

Commit

Permalink
fix(store): update Dockerfile to copy static assets
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuhanW committed May 15, 2024
1 parent 964168e commit 79f3e14
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions examples/store/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

FROM base AS deps
ENV CI true

RUN apk add --no-cache libc6-compat openssh-client
FROM base AS deps

COPY package.json pnpm-lock.yaml .npmrc ./

Expand All @@ -18,26 +18,18 @@ COPY --from=deps /app/refine/node_modules ./node_modules

COPY . .

ENV CI true

RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile --ignore-scripts

RUN pnpm run build --scope store --skipNxCache

RUN ls -l /app/refine/examples/store/.next/standalone/

FROM base AS runner

ENV NODE_ENV production

COPY --from=builder /app/refine/examples/store/public ./public

RUN mkdir .next
RUN chown refine:nodejs .next

RUN rm -rf node_modules

COPY --from=builder --chown=refine:nodejs /app/refine/examples/store/.next/standalone ./
COPY --from=builder --chown=refine:nodejs /app/refine/examples/store/.next/static ./examples/store/.next/static

USER refine

Expand Down

0 comments on commit 79f3e14

Please sign in to comment.