From ba1b8af66a283b16d822b1671f40ea94b1c33d14 Mon Sep 17 00:00:00 2001 From: zhangsz Date: Wed, 8 Jan 2025 11:36:03 +0800 Subject: [PATCH] feat: support file module --- bin/copy.sh | 6 +++--- build/bin/wfccontrol.sh | 1 + build/bin/wfcsetup.sh | 4 ++-- build/docker/docker-compose.yml | 25 +++++++++++++++++++++++++ build/docker/env/default.env | 1 + 5 files changed, 32 insertions(+), 5 deletions(-) diff --git a/bin/copy.sh b/bin/copy.sh index a99edb5..a9aecea 100755 --- a/bin/copy.sh +++ b/bin/copy.sh @@ -58,9 +58,9 @@ echo -n "Begin copy wfc-modules-user ... " cp ${BERootDir}/wfc-modules/wfc-user/target/wfc-modules-user.jar ${BuildDockerDir}/wfc/modules/user/jar echo "done" -# echo -n "Begin copy wfc-modules-file ... " -# cp ${BERootDir}/wfc-modules/wfc-file/target/wfc-modules-file.jar ${BuildDockerDir}/wfc/modules/file/jar -# echo "done" +echo -n "Begin copy wfc-modules-file ... " +cp ${BERootDir}/wfc-modules/wfc-file/target/wfc-modules-file.jar ${BuildDockerDir}/wfc/modules/file/jar +echo "done" echo -n "Begin copy wfc-modules-job ... " cp ${BERootDir}/wfc-modules/wfc-job/target/wfc-modules-job.jar ${BuildDockerDir}/wfc/modules/job/jar diff --git a/build/bin/wfccontrol.sh b/build/bin/wfccontrol.sh index 3ae3254..56dd17a 100755 --- a/build/bin/wfccontrol.sh +++ b/build/bin/wfccontrol.sh @@ -11,6 +11,7 @@ Jars=" \ /opt/wfc/docker/wfc/gateway/jar/wfc-gateway.jar \ /opt/wfc/docker/wfc/modules/system/jar/wfc-modules-system.jar \ /opt/wfc/docker/wfc/modules/user/jar/wfc-modules-user.jar \ + /opt/wfc/docker/wfc/modules/file/jar/wfc-modules-file.jar \ /opt/wfc/docker/wfc/modules/job/jar/wfc-modules-job.jar \ /opt/wfc/docker/wfc/modules/payment/jar/wfc-modules-payment.jar \ " diff --git a/build/bin/wfcsetup.sh b/build/bin/wfcsetup.sh index 6ccb099..7934e12 100755 --- a/build/bin/wfcsetup.sh +++ b/build/bin/wfcsetup.sh @@ -7,8 +7,8 @@ dst_service_dir=/etc/systemd/system java_work_dir=${docker_work_dir}/java base_dockers="wfc-nacos wfc-mysql wfc-redis" -jar_dockers="wfc-auth wfc-gateway wfc-modules-system wfc-modules-user wfc-modules-job wfc-modules-payment" -modules_dockers="wfc-modules-system wfc-modules-user wfc-modules-job wfc-modules-payment" +jar_dockers="wfc-auth wfc-gateway wfc-modules-system wfc-modules-user wfc-modules-job wfc-modules-file wfc-modules-payment" +modules_dockers="wfc-modules-system wfc-modules-user wfc-modules-job wfc-modules-file wfc-modules-payment" fe_docker=wfc-nginx docker_mysql_conf_d=/etc/mysql/conf.d diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml index d4871d1..f2d4619 100644 --- a/build/docker/docker-compose.yml +++ b/build/docker/docker-compose.yml @@ -208,6 +208,31 @@ services: - WFC_USER_PORT=${WFC_USER_PORT} restart: ${RESTART_OPTION} + wfc-modules-file: + image: wfc-java:jre8 + container_name: wfc-modules-file + ports: + - "${WFC_FILE_PORT}:${WFC_FILE_PORT}" + networks: + - wfc-be-network + volumes: + - ./wfc/modules/file/jar/wfc-modules-file.jar:/opt/wfc/app.jar + - ./wfc/modules/file/upload:/opt/wfc/upload + - ./wfc/modules/file/logs/:/opt/wfc/logs/ + depends_on: + wfc-auth: + condition: service_healthy + wfc-gateway: + condition: service_healthy + environment: + - NACOS_PROFILE_NAME=${NACOS_PROFILE_NAME} + - NACOS_NAME_SPACE=${NACOS_NAME_SPACE} + - NACOS_SERVER_NAME=${NACOS_SERVER_NAME} + - NACOS_SERVER_IP=${NACOS_SERVER_IP} + - NACOS_SERVER_PORT=${NACOS_SERVER_PORT} + - WFC_FILE_PORT=${WFC_FILE_PORT} + restart: ${RESTART_OPTION} + wfc-modules-job: image: wfc-java:jre8 container_name: wfc-modules-job diff --git a/build/docker/env/default.env b/build/docker/env/default.env index 654bb90..061fe9d 100644 --- a/build/docker/env/default.env +++ b/build/docker/env/default.env @@ -14,6 +14,7 @@ WFC_SERVER_PORT=80 NACOS_SERVER_PORT=8848 GATEWAY_SERVER_PORT=8080 AUTH_SERVER_PORT=8081 +WFC_FILE_PORT=9201 WFC_JOB_PORT=9203 WFC_PAYMENT_PORT=9204 WFC_SYSTEM_PORT=9205