typescripting2
This commit is contained in:
parent
850a3bf4d2
commit
aacc685da1
12 changed files with 381 additions and 128 deletions
|
@ -1,22 +1,21 @@
|
|||
FROM node:16-alpine AS BUILD_IMAGE
|
||||
|
||||
RUN apk add curl
|
||||
RUN curl -sf https://gobinaries.com/tj/node-prune | sh
|
||||
|
||||
COPY package*.json ./
|
||||
COPY tsconfig.json ./
|
||||
COPY /app ./app
|
||||
RUN npm install
|
||||
|
||||
RUN npm prune --production
|
||||
RUN /usr/local/bin/node-prune
|
||||
|
||||
FROM node:16-alpine
|
||||
|
||||
COPY --from=BUILD_IMAGE /node_modules ./node_modules
|
||||
COPY /app ./app
|
||||
COPY /dist ./dist
|
||||
COPY package*.json ./
|
||||
COPY tsconfig.json ./
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN node /app/db.js
|
||||
|
||||
CMD ["npm", "start"]
|
Loading…
Add table
Add a link
Reference in a new issue