Skip to content

Commit

Permalink
fix(dockerfile): wrong copy destination
Browse files Browse the repository at this point in the history
  • Loading branch information
aldy505 committed Mar 17, 2024
1 parent 731b71e commit 13a321f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 23 deletions.
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,20 @@ WORKDIR /home/app
COPY . .

RUN pnpm fetch && \
pnpm install -r --prefer-offline --frozen-lockfile && \
pnpm install -r --prefer-offline --frozen-lockfile && \
pnpm run build && \
rm -rf node_modules
rm -rf node_modules

FROM node:20-bookworm-slim AS runtime

WORKDIR /home/app

COPY --from=builder /home/app/package.json .
COPY --from=builder /home/app/pnpm-lock.yaml .
COPY --from=builder /home/app/dist .
COPY package.json .
COPY pnpm-lock.yaml .

RUN npm i --global pnpm && pnpm install --prod
RUN npm i --global pnpm && pnpm install --prod && npm uninstall -g pnpm

COPY --from=builder /home/app/dist ./dist

ENV NODE_ENV=production
ENV HOST="0.0.0.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@fontsource/space-grotesk": "^5.0.8",
"@fontsource/unbounded": "^5.0.11",
"@formkit/auto-animate": "1.0.0-pre-alpha.3",
"@leafac/rehype-shiki": "^2.2.1",
"@sentry/astro": "^7.106.1",
"@solid-primitives/scheduled": "^1.4.1",
"astro": "^4.5.1",
Expand All @@ -38,7 +39,6 @@
"devDependencies": {
"@babel/core": "^7.22.11",
"@iconify-json/fluent": "^1.1.33",
"@leafac/rehype-shiki": "^2.2.1",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.5.0",
"@vitest/coverage-v8": "^0.34.3",
Expand Down
55 changes: 39 additions & 16 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 13a321f

Please sign in to comment.