Skip to content

Commit

Permalink
Merge pull request #1 from appventure-nush/squi-ddy-patch-1
Browse files Browse the repository at this point in the history
multi-stage build
  • Loading branch information
squi-ddy authored Jan 23, 2024
2 parents 6c30ece + 599041d commit cc42f52
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FROM node:12-alpine
FROM node:12-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json .
RUN npm ci
COPY . .
RUN mv config.sample.yml config.yml
RUN npm run build

FROM busybox:musl AS deploy
RUN adduser -S nop-guide
USER nop-guide
RUN mkdir /home/nop-guide/nop-guide
WORKDIR /home/nop-guide/nop-guide
COPY --chown=nop-guide:root . .
RUN mv config.sample.yml config.yml
COPY --chown=nop-guide:root --from=builder dist .
COPY httpd.conf .
CMD busybox httpd -f -p 3000 -u nop-guide
1 change: 1 addition & 0 deletions httpd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
E404:index.html

0 comments on commit cc42f52

Please sign in to comment.