stnh70 commited on
Commit
3b107ee
·
verified ·
1 Parent(s): 7efa840

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -0
Dockerfile CHANGED
@@ -20,5 +20,9 @@ RUN npm install
20
  # Expose the default port (3000)
21
  EXPOSE $PORT
22
 
 
 
 
 
23
  # Start the application
24
  CMD ["npm", "run", "start"]
 
20
  # Expose the default port (3000)
21
  EXPOSE $PORT
22
 
23
+ # 设置健康检查
24
+ HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
25
+ CMD curl -f http://localhost:7860 || exit 1
26
+
27
  # Start the application
28
  CMD ["npm", "run", "start"]