fix: enhance setup and start
This commit is contained in:
@@ -6,6 +6,12 @@ services:
|
||||
context: ./nacos
|
||||
environment:
|
||||
- MODE=standalone
|
||||
- SPRING_DATASOURCE_PLATFORM=mysql
|
||||
- MYSQL_SERVICE_HOST=${MYSQL_SERVICE_NAME}
|
||||
- MYSQL_SERVICE_DB_NAME=${WFC_CONFIG_DATABASE}
|
||||
- MYSQL_SERVICE_PORT=${MYSQL_SERVICE_PORT}
|
||||
- MYSQL_SERVICE_USER=${MYSQL_SERVICE_USER}
|
||||
- MYSQL_SERVICE_PASSWORD=${MYSQL_SERVICE_PASSWORD}
|
||||
- NACOS_PROFILE_NAME=${NACOS_PROFILE_NAME}
|
||||
- NACOS_NAME_SPACE=${NACOS_NAME_SPACE}
|
||||
- NACOS_SERVER_NAME=${NACOS_SERVER_NAME}
|
||||
@@ -31,11 +37,11 @@ services:
|
||||
|
||||
wfc-mysql:
|
||||
image: mysql:5.7
|
||||
container_name: wfc-mysql
|
||||
container_name: ${MYSQL_SERVICE_NAME}
|
||||
build:
|
||||
context: ./mysql
|
||||
ports:
|
||||
- "${MYSQL_PORT}:${MYSQL_PORT}"
|
||||
- "${MYSQL_SERVICE_PORT}:${MYSQL_SERVICE_PORT}"
|
||||
networks:
|
||||
- wfc-be-network
|
||||
volumes:
|
||||
@@ -96,12 +102,11 @@ services:
|
||||
- NACOS_SERVER_NAME=${NACOS_SERVER_NAME}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- GATEWAY_SERVER_IP=${GATEWAY_SERVER_IP}
|
||||
- GATEWAY_SERVER_PORT=${GATEWAY_SERVER_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://${GATEWAY_SERVER_IP}:${GATEWAY_SERVER_PORT}/health || exit 1"]
|
||||
interval: 60s
|
||||
timeout: 60s
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:${GATEWAY_SERVER_PORT}/actuator/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 30s
|
||||
retries: 10
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
@@ -130,12 +135,11 @@ services:
|
||||
- NACOS_SERVER_NAME=${NACOS_SERVER_NAME}
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- AUTH_SERVER_IP=${AUTH_SERVER_IP}
|
||||
- AUTH_SERVER_PORT=${AUTH_SERVER_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://${AUTH_SERVER_IP}:${AUTH_SERVER_PORT}/health || exit 1"]
|
||||
interval: 60s
|
||||
timeout: 60s
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:${AUTH_SERVER_PORT}/actuator/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 30s
|
||||
retries: 10
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
@@ -167,6 +171,11 @@ services:
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- WFC_SYSTEM_PORT=${WFC_SYSTEM_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_SYSTEM_PORT}/actuator/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-modules-user:
|
||||
@@ -197,6 +206,11 @@ services:
|
||||
- NACOS_SERVER_IP=${NACOS_SERVER_IP}
|
||||
- NACOS_SERVER_PORT=${NACOS_SERVER_PORT}
|
||||
- WFC_USER_PORT=${WFC_USER_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:${WFC_USER_PORT}/actuator/health || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
restart: ${RESTART_OPTION}
|
||||
|
||||
wfc-modules-file:
|
||||
@@ -301,9 +315,9 @@ services:
|
||||
- ./nginx/logs:/var/log/nginx
|
||||
- ./nginx/conf.d:/etc/nginx/conf.d
|
||||
depends_on:
|
||||
wfc-auth:
|
||||
wfc-modules-system:
|
||||
condition: service_healthy
|
||||
wfc-gateway:
|
||||
wfc-modules-user:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
- GATEWAY_SERVER_IP=${GATEWAY_SERVER_IP}
|
||||
|
||||
Reference in New Issue
Block a user