19 lines
408 B
Docker
19 lines
408 B
Docker
FROM node:18-slim as ts-compiler
|
|
WORKDIR /usr/app
|
|
COPY package*.json ./
|
|
COPY tsconfig*.json ./
|
|
RUN npm install
|
|
COPY . ./
|
|
RUN npm run build
|
|
|
|
FROM node:18-slim as ts-remover
|
|
WORKDIR /usr/app
|
|
COPY --from=ts-compiler /usr/app/package*.json ./
|
|
COPY --from=ts-compiler /usr/app/dist ./
|
|
RUN npm install --omit=dev
|
|
|
|
FROM node:18-slim
|
|
WORKDIR /usr/app
|
|
COPY --from=ts-remover /usr/app ./
|
|
COPY .env ./
|
|
CMD node index.js |