Skip to content

Commit

Permalink
use adapter node with kaniko
Browse files Browse the repository at this point in the history
  • Loading branch information
rezk2ll committed Oct 16, 2023
1 parent 8b1d3c7 commit 65c418c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Dockerfile
.dockerignore
.git
.gitignore
.gitattributes
README.md
.npmrc
.prettierrc
.eslintrc.cjs
.graphqlrc
.editorconfig
.svelte-kit
.vscode
node_modules
build
package
.env
**/.env
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
FROM node:18-alpine

COPY . .
FROM node:18-alpine AS builder

WORKDIR /app
COPY package*.json .
RUN npm ci

COPY . .
RUN npm run build
RUN npm prune --production

FROM node:18-alpine
WORKDIR /app
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .
EXPOSE 3000

ENV NODE_ENV=production
CMD [ "node", "build" ]

0 comments on commit 65c418c

Please sign in to comment.