Add Dockerfile
This commit is contained in:
parent
7c2e53c6e4
commit
96c28027ef
3
.dockerignore
Normal file
3
.dockerignore
Normal file
@ -0,0 +1,3 @@
|
||||
node_modules
|
||||
samples
|
||||
dist
|
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM node:16-slim as builder
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
RUN npm ci && npm run build
|
||||
|
||||
FROM node:16-slim
|
||||
|
||||
COPY --from=builder /app/dist/ /app/
|
||||
COPY --from=builder /app/package.json /app/
|
||||
COPY --from=builder /app/package-lock.json /app/
|
||||
COPY --from=builder /app/static/ /app/static/
|
||||
COPY --from=builder /app/templates/ /app/templates/
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install --production
|
||||
|
||||
CMD ["/usr/local/bin/node", "index.js"]
|
Loading…
Reference in New Issue
Block a user