fix: health check for all serivce
This commit is contained in:
@@ -59,7 +59,7 @@ case "$1" in
|
|||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WANFi Control and Billing Management System Service ... "
|
echo "WANFi Control and Billing System Service ... "
|
||||||
echo "Usage: $0 start|stop|restart|status|version"
|
echo "Usage: $0 start|stop|restart|status|version"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ EOF"
|
|||||||
$0 rm network
|
$0 rm network
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WANFi Control and Billing Management System Setup ... "
|
echo "WANFi Control and Billing System Setup ... "
|
||||||
echo "Usage: $0 rm [base|jar|modules|fe|network|all]"
|
echo "Usage: $0 rm [base|jar|modules|fe|network|all]"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
@@ -295,7 +295,7 @@ EOF"
|
|||||||
docker system prune -a
|
docker system prune -a
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "WANFi Control and Billing Management System Setup ... "
|
echo "WANFi Control and Billing System Setup ... "
|
||||||
echo "Usage: $0 env|initdb|upgdb|base|jar|modules|fe|all|rm [base|jar|modules|fe|network|all]|prune"
|
echo "Usage: $0 env|initdb|upgdb|base|jar|modules|fe|all|rm [base|jar|modules|fe|network|all]|prune"
|
||||||
echo " $0 env [IP]"
|
echo " $0 env [IP]"
|
||||||
echo " $0 initdb"
|
echo " $0 initdb"
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ services:
|
|||||||
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_SYSTEM_PORT}/actuator/health || exit 1"]
|
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_SYSTEM_PORT}/actuator/health || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 6
|
||||||
restart: ${RESTART_OPTION}
|
restart: ${RESTART_OPTION}
|
||||||
|
|
||||||
wfc-modules-user:
|
wfc-modules-user:
|
||||||
@@ -232,7 +232,7 @@ services:
|
|||||||
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_USER_PORT}/actuator/health || exit 1"]
|
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_USER_PORT}/actuator/health || exit 1"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 6
|
||||||
restart: ${RESTART_OPTION}
|
restart: ${RESTART_OPTION}
|
||||||
|
|
||||||
wfc-modules-file:
|
wfc-modules-file:
|
||||||
@@ -263,6 +263,11 @@ services:
|
|||||||
- WFC_FILE_PORT=${WFC_FILE_PORT}
|
- WFC_FILE_PORT=${WFC_FILE_PORT}
|
||||||
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
|
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_FILE_PORT}/actuator/health || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 6
|
||||||
restart: ${RESTART_OPTION}
|
restart: ${RESTART_OPTION}
|
||||||
|
|
||||||
wfc-modules-job:
|
wfc-modules-job:
|
||||||
@@ -293,6 +298,11 @@ services:
|
|||||||
- WFC_JOB_PORT=${WFC_JOB_PORT}
|
- WFC_JOB_PORT=${WFC_JOB_PORT}
|
||||||
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
|
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_JOB_PORT}/actuator/health || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 6
|
||||||
restart: ${RESTART_OPTION}
|
restart: ${RESTART_OPTION}
|
||||||
|
|
||||||
wfc-modules-payment:
|
wfc-modules-payment:
|
||||||
@@ -326,6 +336,11 @@ services:
|
|||||||
- WFC_PAYMENT_PORT=${WFC_PAYMENT_PORT}
|
- WFC_PAYMENT_PORT=${WFC_PAYMENT_PORT}
|
||||||
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
|
- SPRING_CONFIG_ADDITIONAL_LOCATION=optional:classpath:/,optional:file:/opt/wfc/conf/
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_PAYMENT_PORT}/actuator/health || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 6
|
||||||
restart: ${RESTART_OPTION}
|
restart: ${RESTART_OPTION}
|
||||||
|
|
||||||
wfc-nginx:
|
wfc-nginx:
|
||||||
@@ -339,6 +354,7 @@ services:
|
|||||||
- wfc-fe-network
|
- wfc-fe-network
|
||||||
- wfc-be-network
|
- wfc-be-network
|
||||||
volumes:
|
volumes:
|
||||||
|
- ./wfc/modules/file/upload:/opt/wfc/file/upload
|
||||||
- ./nginx/html/dist:/opt/wfc/portal
|
- ./nginx/html/dist:/opt/wfc/portal
|
||||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./nginx/logs:/var/log/nginx
|
- ./nginx/logs:/var/log/nginx
|
||||||
@@ -354,6 +370,16 @@ services:
|
|||||||
- WFC_SERVER_IP=${WFC_SERVER_IP}
|
- WFC_SERVER_IP=${WFC_SERVER_IP}
|
||||||
- WFC_SERVER_PORT=${WFC_SERVER_PORT}
|
- WFC_SERVER_PORT=${WFC_SERVER_PORT}
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
- "CMD-SHELL"
|
||||||
|
- >
|
||||||
|
curl -f http://localhost:${WFC_SERVER_PORT}/sys &&
|
||||||
|
curl -f http://localhost:${WFC_SERVER_PORT}/u ||
|
||||||
|
exit 1
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 6
|
||||||
restart: ${RESTART_OPTION}
|
restart: ${RESTART_OPTION}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=WANFi Control and Billing Management System
|
Description=WANFi Control and Billing System
|
||||||
After=network.target
|
After=network.target
|
||||||
Requires=network.target
|
Requires=network.target
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user