initial commit
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM node:24-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --no-audit --no-fund
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM node:24-alpine
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production HOST=0.0.0.0 PORT=5180
|
||||
COPY package*.json ./
|
||||
RUN npm ci --omit=dev --no-audit --no-fund
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY server ./server
|
||||
USER node
|
||||
EXPOSE 5180
|
||||
HEALTHCHECK --interval=30s --timeout=5s CMD node -e "fetch('http://127.0.0.1:5180/healthz').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
|
||||
CMD ["node", "server/index.mjs"]
|
||||
Reference in New Issue
Block a user