16 lines
No EOL
402 B
Docker
16 lines
No EOL
402 B
Docker
FROM node:19.7.0-alpine AS build
|
|
WORKDIR /usr/src/app
|
|
COPY package*.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
FROM node:19.7.0-alpine
|
|
WORKDIR /usr/src/app
|
|
COPY package*.json ./
|
|
RUN npm install --only=production
|
|
COPY --from=build /usr/src/app/dist ./dist
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=15s \
|
|
CMD wget -qO- http://localhost:1111/health || exit 1
|
|
CMD ["npm", "start"] |