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}
|
||||
|
||||
11
build/docker/env/default.env
vendored
11
build/docker/env/default.env
vendored
@@ -1,11 +1,11 @@
|
||||
MYSQL_ROOT_PASSWORD=123456
|
||||
MYSQL_DATABASE=wfc_system_db
|
||||
WFC_CONFIG_DATABASE=wfc_config_db
|
||||
WFC_SYSTEM_DATABASE=wfc_system_db
|
||||
WFC_USER_DATABASE=wfc_user_db
|
||||
MYSQL_PORT=3306
|
||||
MYSQL_USER=mysql
|
||||
MYSQL_PASSWORD=123456
|
||||
MYSQL_SERVICE_NAME=wfc-mysql
|
||||
MYSQL_SERVICE_PORT=3306
|
||||
MYSQL_ROOT_PASSWORD=123456
|
||||
MYSQL_SERVICE_USER=root
|
||||
MYSQL_SERVICE_PASSWORD=123456
|
||||
REDIS_PORT=6379
|
||||
NACOS_PROFILE_NAME=prod
|
||||
NACOS_NAME_SPACE=wfc-prod
|
||||
@@ -22,6 +22,5 @@ WFC_USER_PORT=9206
|
||||
WFC_SERVER_IP=192.168.13.128
|
||||
NACOS_SERVER_IP=${WFC_SERVER_IP}
|
||||
GATEWAY_SERVER_IP=${WFC_SERVER_IP}
|
||||
AUTH_SERVER_IP=${WFC_SERVER_IP}
|
||||
RESTART_OPTION=on-failure:5
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ server:
|
||||
|
||||
# Omada 配置
|
||||
omada:
|
||||
omada-url: 'https://192.168.2.248:8043'
|
||||
omada-url: 'https://192.168.2.249:8043'
|
||||
omadac-id: 'f3aa6e479b94222581523710cc2c2a9d'
|
||||
client-id: '5036e77c81a74008821c694a715fe2b8'
|
||||
client-secret: '29faa06fb7f244b094377b48eb3083a7'
|
||||
Reference in New Issue
Block a user