From 9c51bc65c4ba0f712f773cb3000a552b61b1bd01 Mon Sep 17 00:00:00 2001 From: Carson Yang Date: Thu, 7 Nov 2024 15:09:32 +0800 Subject: [PATCH] feat(docker): add police filing env and update cloud domain Add NEXT_PUBLIC_POLICE_FILING environment variable for police filing requirements and update cloud domain from tryfastgpt.ai to fastgpt.cn. - Add NEXT_PUBLIC_POLICE_FILING as both ARG and ENV - Update cloud domain references in sed commands Signed-off-by: Carson Yang --- projects/fastgpt/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/fastgpt/Dockerfile b/projects/fastgpt/Dockerfile index c55fab3..2f4a93f 100644 --- a/projects/fastgpt/Dockerfile +++ b/projects/fastgpt/Dockerfile @@ -12,12 +12,14 @@ ARG NEXT_PUBLIC_BAIDU_KEY ARG NEXT_PUBLIC_HOME_URL ARG NEXT_PUBLIC_USER_URL ARG NEXT_PUBLIC_FILING_ADDRESS +ARG NEXT_PUBLIC_POLICE_FILING ENV NEXT_PUBLIC_BAIDU_TONGJI=$NEXT_PUBLIC_BAIDU_TONGJI ENV NEXT_PUBLIC_BAIDU_KEY=$NEXT_PUBLIC_BAIDU_KEY ENV NEXT_PUBLIC_HOME_URL=$NEXT_PUBLIC_HOME_URL ENV NEXT_PUBLIC_USER_URL=$NEXT_PUBLIC_USER_URL ENV NEXT_PUBLIC_FILING_ADDRESS=$NEXT_PUBLIC_FILING_ADDRESS +ENV NEXT_PUBLIC_POLICE_FILING=$NEXT_PUBLIC_POLICE_FILING # copy packages and one project ADD . ./ @@ -25,6 +27,7 @@ ADD . ./ RUN sed -i "s#https://doc.fastgpt.in#https://doc.fastgpt.cn#g" $(grep -rl "https://doc.fastgpt.in" ./) RUN sed -i "s#https://doc.tryfastgpt.ai#https://doc.fastgpt.cn#g" $(grep -rl "https://doc.tryfastgpt.ai" ./) +RUN sed -i "s#https://cloud.tryfastgpt.ai#https://cloud.fastgpt.cn#g" $(grep -rl "https://cloud.tryfastgpt.ai" ./) RUN sed -i "s/defaultLocale = \"en\"/defaultLocale = \"zh\"/g" lib/i18n.ts RUN npm install @@ -35,4 +38,4 @@ FROM fholzer/nginx-brotli:latest LABEL org.opencontainers.image.source https://github.com/labring/fastgpt-home COPY --from=builder /app/out /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file