Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
LAE
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
文靖昊
LAE
Commits
6f578bb3
Commit
6f578bb3
authored
Jun 21, 2024
by
文靖昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
使用一个database
parent
e78c7fe2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
25 deletions
+21
-25
docker-compose.yml
docker-compose.yml
+0
-16
create_db.sql
init_db/create_db.sql
+0
-2
create_table.sql
init_db/create_table.sql
+20
-6
insert_data.sql
init_db/insert_data.sql
+0
-0
consts.py
src/config/consts.py
+1
-1
No files found.
docker-compose.yml
View file @
6f578bb3
...
...
@@ -12,20 +12,4 @@ services:
-
./lae_pg_data:/var/lib/postgresql/data
-
./init_db/create_db.sql:/docker-entrypoint-initdb.d/create_db.sql
-
./init_db/create_table.sql:/docker-entrypoint-initdb.d/create_table.sql
-
./init_db/insert_data.sql:/docker-entrypoint-initdb.d/insert_data.sql
python
:
build
:
context
:
.
dockerfile
:
Dockerfile
image
:
lae_python_image:v1
container_name
:
lae_python
ports
:
-
"
8003:8003"
stdin_open
:
true
tty
:
true
command
:
sh -c "cd src && python gradio_app.py"
volumes
:
lae_pg_data
:
init_db/create_db.sql
View file @
6f578bb3
create
database
lae
;
create
database
lae_chat
;
\ No newline at end of file
init_db/create_table.sql
View file @
6f578bb3
...
...
@@ -72,10 +72,24 @@ START 1
CACHE
1
;
ALTER
TABLE
c_user
ALTER
COLUMN
user_id
SET
DEFAULT
nextval
(
'c_user_seq'
::
regclass
);
INSERT
INTO
public
.
c_user
(
user_id
,
account
,
password
)
VALUES
(
'1'
,
'zhangs'
,
'111111'
);
INSERT
INTO
public
.
c_user
(
user_id
,
account
,
password
)
VALUES
(
'2'
,
'lis'
,
'111111'
);
create
table
txt_doc
(
hash
varchar
(
40
)
not
null
primary
key
,
text
text
not
null
,
matadate
text
);
alter
table
txt_doc
owner
to
postgres
;
create
table
vec_txt
(
vector_id
varchar
(
36
)
not
null
primary
key
,
text
text
,
paragraph_id
varchar
(
40
)
not
null
);
INSERT
INTO
public
.
chat
(
chat_id
,
user_id
,
info
,
create_time
,
deleted
)
VALUES
(
'1'
,
'1'
,
'这是chat_id为1的问答info'
,
'2024-05-27 01:12:05.022546'
,
0
);
INSERT
INTO
public
.
chat
(
chat_id
,
user_id
,
info
,
create_time
,
deleted
)
VALUES
(
'2'
,
'1'
,
'这是chat_id为2的问答info'
,
'2024-05-27 01:12:05.025912'
,
0
);
INSERT
INTO
public
.
chat
(
chat_id
,
user_id
,
info
,
create_time
,
deleted
)
VALUES
(
'3'
,
'2'
,
'这是chat_id为3的问答info'
,
'2024-05-27 01:12:05.027267'
,
0
);
INSERT
INTO
public
.
chat
(
chat_id
,
user_id
,
info
,
create_time
,
deleted
)
VALUES
(
'4'
,
'2'
,
'这是chat_id为4的问答info'
,
'2024-05-27 01:12:05.028840'
,
0
);
alter
table
vec_txt
owner
to
postgres
;
init_db/insert_data.sql
deleted
100644 → 0
View file @
e78c7fe2
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/config/consts.py
View file @
6f578bb3
...
...
@@ -11,7 +11,7 @@ VEC_DB_PORT = '5433'
# 聊天相关数据库配置
# =============================
CHAT_DB_HOST
=
'192.168.10.93'
CHAT_DB_DBNAME
=
'lae
_chat
'
CHAT_DB_DBNAME
=
'lae'
CHAT_DB_USER
=
'postgres'
CHAT_DB_PASSWORD
=
'111111'
CHAT_DB_PORT
=
'5433'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment