mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-21 11:30:06 +00:00
fix: template
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# 运行端口,如果不是 3000 口运行,需要改成其他的。注意:不是改了这个变量就会变成其他端口,而是因为改成其他端口,才用这个变量。
|
# 运行端口,如果不是 3000 口运行,需要改成其他的。注意:不是改了这个变量就会变成其他端口,而是因为改成其他端口,才用这个变量。
|
||||||
DB_MAX_LINK=15 # database max link
|
|
||||||
PORT=3000
|
PORT=3000
|
||||||
|
# database max link
|
||||||
|
DB_MAX_LINK=15
|
||||||
# 代理
|
# 代理
|
||||||
# AXIOS_PROXY_HOST=127.0.0.1
|
# AXIOS_PROXY_HOST=127.0.0.1
|
||||||
# AXIOS_PROXY_PORT=7890
|
# AXIOS_PROXY_PORT=7890
|
||||||
|
@@ -31,7 +31,7 @@ const queryClient = new QueryClient({
|
|||||||
function App({ Component, pageProps }: AppProps) {
|
function App({ Component, pageProps }: AppProps) {
|
||||||
const {
|
const {
|
||||||
loadInitData,
|
loadInitData,
|
||||||
initData: { googleVerKey }
|
initData: { googleVerKey, baiduTongji }
|
||||||
} = useGlobalStore();
|
} = useGlobalStore();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -52,7 +52,7 @@ function App({ Component, pageProps }: AppProps) {
|
|||||||
<Script src="/js/qrcode.min.js" strategy="afterInteractive"></Script>
|
<Script src="/js/qrcode.min.js" strategy="afterInteractive"></Script>
|
||||||
<Script src="/js/pdf.js" strategy="afterInteractive"></Script>
|
<Script src="/js/pdf.js" strategy="afterInteractive"></Script>
|
||||||
<Script src="/js/html2pdf.bundle.min.js" strategy="afterInteractive"></Script>
|
<Script src="/js/html2pdf.bundle.min.js" strategy="afterInteractive"></Script>
|
||||||
<Script src="/js/baidutongji.js" strategy="afterInteractive"></Script>
|
{baiduTongji && <Script src="/js/baidutongji.js" strategy="afterInteractive"></Script>}
|
||||||
{googleVerKey && (
|
{googleVerKey && (
|
||||||
<>
|
<>
|
||||||
<Script
|
<Script
|
||||||
|
@@ -5,13 +5,15 @@ import { jsonRes } from '@/service/response';
|
|||||||
export type InitDateResponse = {
|
export type InitDateResponse = {
|
||||||
beianText: string;
|
beianText: string;
|
||||||
googleVerKey: string;
|
googleVerKey: string;
|
||||||
|
baiduTongji: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||||
jsonRes<InitDateResponse>(res, {
|
jsonRes<InitDateResponse>(res, {
|
||||||
data: {
|
data: {
|
||||||
beianText: process.env.SAFE_BEIAN_TEXT || '',
|
beianText: process.env.SAFE_BEIAN_TEXT || '',
|
||||||
googleVerKey: process.env.CLIENT_GOOGLE_VER_TOKEN || ''
|
googleVerKey: process.env.CLIENT_GOOGLE_VER_TOKEN || '',
|
||||||
|
baiduTongji: process.env.BAIDU_TONGJI === '1'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,8 @@ export const useGlobalStore = create<State>()(
|
|||||||
immer((set, get) => ({
|
immer((set, get) => ({
|
||||||
initData: {
|
initData: {
|
||||||
beianText: '',
|
beianText: '',
|
||||||
googleVerKey: ''
|
googleVerKey: '',
|
||||||
|
baiduTongji: false
|
||||||
},
|
},
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
try {
|
try {
|
||||||
|
@@ -1,31 +0,0 @@
|
|||||||
# 运行端口,如果不是 3000 口运行,需要改成其他的。注意:不是改了这个变量就会变成其他端口,而是因为改成其他端口,才用这个变量。
|
|
||||||
PORT=3000
|
|
||||||
# 代理
|
|
||||||
# AXIOS_PROXY_HOST=127.0.0.1
|
|
||||||
# AXIOS_PROXY_PORT=7890
|
|
||||||
# email
|
|
||||||
MY_MAIL=xxxx@qq.com
|
|
||||||
MAILE_CODE=xxxx
|
|
||||||
# ali ems
|
|
||||||
aliAccessKeyId=xxxx
|
|
||||||
aliAccessKeySecret=xxxx
|
|
||||||
aliSignName=xxxx
|
|
||||||
aliTemplateCode=xxxx
|
|
||||||
# token
|
|
||||||
TOKEN_KEY=dfdasfdas
|
|
||||||
# root key, 最高权限
|
|
||||||
ROOT_KEY=fdafasd
|
|
||||||
# openai
|
|
||||||
# OPENAI_BASE_URL=http://ai.openai.com/v1
|
|
||||||
# OPENAI_BASE_URL_AUTH=可选安全凭证,会放到 header.auth 里
|
|
||||||
OPENAIKEY=sk-xxx
|
|
||||||
OPENAI_TRAINING_KEY=sk-xxx
|
|
||||||
GPT4KEY=sk-xxx
|
|
||||||
# db
|
|
||||||
MONGODB_URI=mongodb://username:password@0.0.0.0:27017/?authSource=admin
|
|
||||||
MONGODB_NAME=fastgpt
|
|
||||||
PG_HOST=0.0.0.0
|
|
||||||
PG_PORT=8100
|
|
||||||
PG_USER=root
|
|
||||||
PG_PASSWORD=psw
|
|
||||||
PG_DB_NAME=dbname
|
|
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
第一次开发,请先[部署教程](../deploy/docker.md),需要部署数据库.
|
第一次开发,请先[部署教程](../deploy/docker.md),需要部署数据库.
|
||||||
|
|
||||||
|
client: FastGpt 网页项目
|
||||||
|
admin: 管理端
|
||||||
|
|
||||||
## 环境变量配置 (可能更新不及时,以 docker-compose 里的变量为准)
|
## 环境变量配置 (可能更新不及时,以 docker-compose 里的变量为准)
|
||||||
|
|
||||||
复制.env.template 文件,生成一个.env.local 环境变量文件夹,修改.env.local 里内容。
|
复制.env.template 文件,生成一个.env.local 环境变量文件夹,修改.env.local 里内容。
|
||||||
|
Reference in New Issue
Block a user