Skip to content

Commit 93af323

Browse files
authored
feat(close #9): Dockerfile & .dockerignore supports (#10)
1 parent 18a31d5 commit 93af323

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build
2+
node_modules
3+
Dockerfile
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM node:<%= elementNodeVersion %>-alpine as builder
2+
WORKDIR /app
3+
COPY . .
4+
RUN yarn && yarn build && yarn purge && yarn --production
5+
6+
FROM node:<%= elementNodeVersion %>-alpine
7+
RUN apk add --no-cache curl
8+
WORKDIR /app
9+
COPY --from=builder /app/build build
10+
COPY --from=builder /app/node_modules node_modules
11+
HEALTHCHECK --interval=30s --timeout=30s --retries=3 CMD curl --fail http://${HOST}:${PORT}/health || exit 1
12+
CMD ["node", "build/index.js"]

0 commit comments

Comments
 (0)