Skip to content

Commit

Permalink
Add containerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
ondryaso committed Nov 2, 2024
1 parent d1dd568 commit ea56890
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.vscode/
.git/
.gitignore
18 changes: 18 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM docker.io/node:23-alpine3.19
EXPOSE 8080

ARG NODE_ENV=production
ENV NODE_ENV $NODE_ENV

WORKDIR /app
RUN chown node:node ./

USER node

COPY package.json package-lock.json* ./
RUN npm ci && npm cache clean --force

COPY *.js ./
COPY frontend/ frontend/

CMD ["node", "./backend.js"]

0 comments on commit ea56890

Please sign in to comment.