fix(env): docker
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
12
build.sh
12
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}"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
// 获取验证码
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user