s
This commit is contained in:
commit
633ebca9a6
8
DockerfileSlim
Normal file
8
DockerfileSlim
Normal file
@ -0,0 +1,8 @@
|
||||
FROM nginx
|
||||
|
||||
COPY ./dist/ /usr/share/nginx/html/public/
|
||||
COPY ./public/favicon.ico /usr/share/nginx/html/public/favicon.ico
|
||||
COPY ./docs/conf/nginx.conf /etc/nginx/nginx.conf
|
||||
COPY ./docs/conf/conf.d/ /etc/nginx/conf.d/
|
||||
|
||||
ENTRYPOINT ["nginx","-g","daemon off;"]
|
31
docs/conf/conf.d/default.conf
Normal file
31
docs/conf/conf.d/default.conf
Normal file
@ -0,0 +1,31 @@
|
||||
server{
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
client_max_body_size 1020M;
|
||||
root /usr/share/nginx/html/public;
|
||||
index index.html index.htm;
|
||||
|
||||
location / {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Client-Verify SUCCESS;
|
||||
proxy_set_header X-Client-DN $ssl_client_s_dn;
|
||||
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
|
||||
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
|
||||
proxy_read_timeout 1800;
|
||||
proxy_connect_timeout 1800;
|
||||
client_max_body_size 1020M;
|
||||
try_files $uri $uri/ /index.html;
|
||||
|
||||
|
||||
add_header Access-Control-Allow-Origin $http_origin;
|
||||
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
|
||||
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
|
||||
|
||||
if ($request_method = 'OPTIONS') {
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
37
docs/conf/nginx.conf
Normal file
37
docs/conf/nginx.conf
Normal file
@ -0,0 +1,37 @@
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 20480;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
fastcgi_buffer_size 128k;
|
||||
fastcgi_buffers 256 16k;
|
||||
client_max_body_size 1020m;
|
||||
client_body_buffer_size 1024k;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
}
|
@ -2,7 +2,7 @@
|
||||
import {createSession} from "@/api/api";
|
||||
import {storeToRefs} from "pinia";
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { NButton, NLayoutSider, useDialog } from 'naive-ui'
|
||||
import { NButton, NLayoutSider, useDialog,NSelect } from 'naive-ui'
|
||||
import List from './List.vue'
|
||||
import Footer from './Footer.vue'
|
||||
import { useAppStore, useChatStore } from '@/store'
|
||||
@ -95,15 +95,8 @@ watch(
|
||||
<NButton color="#764CF6" style="flex:0.9;display: flex;justify-content: center;align-items: center;margin-right: auto" dashed block @click="handleAdd">
|
||||
新建会话
|
||||
</NButton>
|
||||
<div >
|
||||
<a-select
|
||||
align="center"
|
||||
v-model:value="gptMode"
|
||||
style="width: 110px"
|
||||
:dropdown-match-select-width="false"
|
||||
>
|
||||
<a-select-option align="center" v-for="(item,index) in options" :key="index" :value="item.value">{{item.label}}</a-select-option>
|
||||
</a-select>
|
||||
<div style="width: 110px">
|
||||
<n-select v-model:value="gptMode" :options="options" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 min-h-0 pb-4 overflow-hidden">
|
||||
|
Loading…
Reference in New Issue
Block a user