first commit
This commit is contained in:
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM node:20-alpine AS base
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN apk add --no-cache git && npm install --omit=dev
|
||||
|
||||
COPY . .
|
||||
EXPOSE ${PORT:-3000}
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 CMD node -e "require('http').get('http://localhost:'+(process.env.PORT||3000)+'/health',res=>{if(res.statusCode===200)process.exit(0);process.exit(1);}).on('error',()=>process.exit(1))"
|
||||
|
||||
CMD ["node", "src/server.js"]
|
||||
Reference in New Issue
Block a user