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"]
|
||||
|
||||
BIN
data/sessions.db
BIN
data/sessions.db
Binary file not shown.
@@ -10,8 +10,8 @@ services:
|
||||
- PORT=3000
|
||||
- NODE_ENV=production
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health"]
|
||||
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 3s
|
||||
retries: 3
|
||||
start_period: 5s
|
||||
start_period: 10s
|
||||
|
||||
Reference in New Issue
Block a user