From 9f0fd187d0d85bc382515871cfa66e6e554a2bc9 Mon Sep 17 00:00:00 2001 From: zhangheng Date: Sat, 28 Mar 2026 13:54:44 +0800 Subject: [PATCH] fix(env): docker --- .env.development | 2 +- .env.staging | 2 +- build.sh | 12 ++++++------ components/label/api/const.ts | 2 +- components/login/api/index.ts | 2 +- docker-compose.yml | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.env.development b/.env.development index f0c4a53..7e209f2 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ NEXT_PUBLIC_ENV=development # redis -# NEXT_PUBLIC_REDIS_URL="172.16.112.128" +# NEXT_PUBLIC_REDIS_URL="172.16.115.128" NEXT_PUBLIC_REDIS_URL="localhost" NEXT_PUBLIC_REDIS_PORT=9765 NEXT_PUBLIC_REDIS_PASSWORD=password diff --git a/.env.staging b/.env.staging index 9dcef7b..f4fc254 100644 --- a/.env.staging +++ b/.env.staging @@ -3,7 +3,7 @@ NEXT_PUBLIC_BASE_PATH="/image" NEXT_PUBLIC_ENV=staging # redis -NEXT_PUBLIC_REDIS_URL="172.30.21.213" +NEXT_PUBLIC_REDIS_URL="172.16.115.128" NEXT_PUBLIC_REDIS_PORT=9765 NEXT_PUBLIC_REDIS_PASSWORD=password NEXT_PUBLIC_REDIS_USERNAME=default diff --git a/build.sh b/build.sh index 06b9d0a..d28eda5 100755 --- a/build.sh +++ b/build.sh @@ -71,23 +71,23 @@ pnpm run $BUILD_FLAG if [[ $? != 0 ]]; then echo -e "${RED}build error${NC}"; exit 100; fi # Docker构建和推送 -MAIN_NAME=digitalspace_labelimage +MAIN_NAME=web_digitalspace_labelimage DOCKER_FILE=$SHELL_FOLDER/Dockerfile if [[ $OUTPUT_TYPE == export ]]; then DOCKER_FILE=$SHELL_FOLDER/docker/nginx.dockerfile - MAIN_NAME=digitalspace_labelimage_static + MAIN_NAME=web_digitalspace_labelimage_static elif [[ $OUTPUT_TYPE == standalone ]]; then DOCKER_FILE=$SHELL_FOLDER/docker/node.dockerfile - MAIN_NAME=digitalspace_labelimage_ssr + MAIN_NAME=web_digitalspace_labelimage_ssr fi echo -e "${GREEN}Building docker image...${NC}" -sudo docker build -f $DOCKER_FILE -t $MAIN_NAME $SHELL_FOLDER +docker build -f $DOCKER_FILE -t $MAIN_NAME $SHELL_FOLDER if [[ $? != 0 ]]; then echo -e "${RED}build docker with error${NC}"; exit 100; fi echo -e "${GREEN}Tagging and pushing docker image...${NC}" -sudo docker tag $MAIN_NAME harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD -# docker push harbor.cowarobot.cn/gopro/$MAIN_NAME:$FLAG_PROD +docker tag $MAIN_NAME harbor.cowarobot.cn/softrepo/$MAIN_NAME:$FLAG_PROD +docker push harbor.cowarobot.cn/softrepo/$MAIN_NAME:$FLAG_PROD echo -e "${GREEN}Build completed successfully${NC}" diff --git a/components/label/api/const.ts b/components/label/api/const.ts index 8b520b4..85a96fa 100644 --- a/components/label/api/const.ts +++ b/components/label/api/const.ts @@ -2,5 +2,5 @@ export const BASE_LABEL_API = process.env.NEXT_PUBLIC_ENV === "production" ? "https://label.cowarobot.com" : process.env.NEXT_PUBLIC_ENV === "staging" - ? "https://label.softtest.cowarobot.com" + ? "http://172.16.115.128:9110" : "https://label.softtest.cowarobot.com" diff --git a/components/login/api/index.ts b/components/login/api/index.ts index a4d5890..c3d63e8 100644 --- a/components/login/api/index.ts +++ b/components/login/api/index.ts @@ -6,7 +6,7 @@ const BASE_PATH = process.env.NEXT_PUBLIC_ENV === "production" ? "https://label.cowarobot.com" : process.env.NEXT_PUBLIC_ENV === "staging" - ? "https://label.softtest.cowarobot.com" + ? "http://172.16.115.128:9110" : "https://label.softtest.cowarobot.com" // 获取验证码 diff --git a/docker-compose.yml b/docker-compose.yml index 975c08c..73dc848 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ version: "3" services: - digitalspace_labelimage_ssr: - container_name: digitalspace_labelimage_ssr - image: harbor.cowarobot.cn/gopro/digitalspace_labelimage_ssr:stage_latest + web_digitalspace_labelimage_ssr: + container_name: web_digitalspace_labelimage_ssr + image: harbor.cowarobot.cn/softrepo/web_digitalspace_labelimage_ssr:stage_latest restart: unless-stopped ports: - 5532:5532