修复固件哈希兼容性并完善部署配置

This commit is contained in:
mid
2026-08-08 16:18:41 +08:00
parent 290da46567
commit 34503f2638
13 changed files with 271 additions and 25 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ FROM node:22-alpine AS runtime
ENV NODE_ENV=production \
HOST=0.0.0.0 \
PORT=8080 \
PORT=9000 \
DATA_DIR=/data
WORKDIR /app
@@ -24,9 +24,9 @@ COPY --chown=node:node server ./server
COPY --chown=node:node shared ./shared
USER node
EXPOSE 8080
EXPOSE 9000
VOLUME ["/data"]
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:8080/healthz').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
CMD node -e "fetch('http://127.0.0.1:9000/healthz').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"
CMD ["node", "server/index.mjs"]