ci(docker): increase health check start period and use localhost IP
- Increase start_period from 5s to 10s to allow more time for service initialization - Change health check URL from localhost to 127.0.0.1 for better compatibility
This commit is contained in:
@@ -18,7 +18,7 @@ RUN npm run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/health || exit 1
|
||||
|
||||
CMD ["npm", "start"]
|
||||
|
||||
Reference in New Issue
Block a user