Update Dockerfile with Node.js 22 and add health check
This commit is contained in:
parent
a26d0c77a1
commit
5616fc5876
2 changed files with 3 additions and 1 deletions
1
.nvmrc
Normal file
1
.nvmrc
Normal file
|
@ -0,0 +1 @@
|
|||
v22.13.1
|
|
@ -7,7 +7,7 @@ COPY . .
|
|||
RUN npm run build
|
||||
|
||||
# Deps stage
|
||||
FROM node:18-alpine AS dependencies
|
||||
FROM node:22-alpine AS dependencies
|
||||
WORKDIR /app
|
||||
COPY package*.json .
|
||||
RUN npm ci --omit=dev
|
||||
|
@ -19,3 +19,4 @@ COPY package*.json .
|
|||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=dependencies /app/node_modules ./node_modules
|
||||
CMD ["npm", "run", "start"]
|
||||
HEALTHCHECK --interval=1m --start-period=5s CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/health || exit 1
|
||||
|
|
Loading…
Reference in a new issue