数字我 Digital Me:全量入库(大文件走 Git LFS)
nginx serve /uploads direct (audio speed) / patch-nginx (push) Failing after 1m34s
nginx serve /uploads direct (audio speed) / patch-nginx (push) Failing after 1m34s
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
FROM node:20-alpine AS dependencies
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json .npmrc ./
|
||||
RUN npm ci
|
||||
|
||||
FROM dependencies AS development
|
||||
|
||||
COPY . .
|
||||
|
||||
ENV NODE_ENV=development
|
||||
EXPOSE 3701
|
||||
|
||||
CMD ["npm", "run", "dev"]
|
||||
|
||||
FROM node:20-alpine AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY package.json package-lock.json .npmrc ./
|
||||
RUN npm ci --omit=dev && npm cache clean --force
|
||||
|
||||
COPY --chown=node:node . .
|
||||
|
||||
USER node
|
||||
|
||||
EXPOSE 3701
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
||||
CMD wget --quiet --spider http://127.0.0.1:3701/health || exit 1
|
||||
|
||||
CMD ["npm", "start"]
|
||||
Reference in New Issue
Block a user