Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
agentchat
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李伟@五瓣科技
agentchat
Commits
79415cb4
Commit
79415cb4
authored
Jun 09, 2025
by
Wade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add pg
parent
dbc1cefb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
init.sql
config/pg/init.sql
+37
-0
docker-compose-pg.yml
docker-compose-pg.yml
+17
-0
docker-compose.yml
docker-compose.yml
+1
-1
No files found.
config/pg/init.sql
0 → 100644
View file @
79415cb4
-- Create the qa table if it doesn't exist
CREATE
TABLE
IF
NOT
EXISTS
public
.
qa
(
id
BIGINT
GENERATED
BY
DEFAULT
AS
IDENTITY
NOT
NULL
,
created_at
TIMESTAMP
WITH
TIME
ZONE
NOT
NULL
DEFAULT
NOW
(),
question
TEXT
,
answer
TEXT
,
summary
TEXT
,
"from"
TEXT
,
"to"
TEXT
,
from_id
TEXT
,
to_id
TEXT
,
milvus
BOOLEAN
DEFAULT
FALSE
,
graph
BOOLEAN
DEFAULT
FALSE
,
CONSTRAINT
qa_pkey
PRIMARY
KEY
(
id
)
)
TABLESPACE
pg_default
;
-- Create or replace the qa_latest_from_id view
CREATE
OR
REPLACE
VIEW
public
.
qa_latest_from_id
AS
SELECT
DISTINCT
ON
(
qa
.
from_id
)
qa
.
id
,
qa
.
created_at
,
qa
.
question
,
qa
.
answer
,
qa
.
summary
,
qa
.
"from"
,
qa
.
"to"
,
qa
.
from_id
,
qa
.
to_id
,
qa
.
milvus
,
qa
.
graph
FROM
qa
WHERE
qa
.
from_id
IS
NOT
NULL
ORDER
BY
qa
.
from_id
,
qa
.
created_at
DESC
;
\ No newline at end of file
docker-compose-pg.yml
0 → 100644
View file @
79415cb4
version
:
'
3.8'
# Specify version for clarity
services
:
db
:
image
:
postgres
restart
:
always
shm_size
:
128mb
environment
:
POSTGRES_PASSWORD
:
example
volumes
:
-
./config/pg/init.sql:/docker-entrypoint-initdb.d/init.sql
# Mount the init script
ports
:
-
5432:5432
# Expose PostgreSQL port to host
adminer
:
image
:
adminer
restart
:
always
ports
:
-
8080:8080
docker-compose.yml
View file @
79415cb4
...
...
@@ -11,7 +11,7 @@ services:
-
GEMINI_API_KEY=${GEMINI_API_KEY}
# Reference variable from .env
ports
:
-
"
8000:8000"
entrypoint
:
/bin/sh -c "sleep 60 && /app/myapp -milvus-addr=standalone:19530 -graphrag-addr=webserver:5670"
entrypoint
:
/bin/sh -c "sleep 60 && /app/myapp -milvus-addr=standalone:19530 -graphrag-addr=webserver:5670
-pg-conn-string=postgresql://postgres:example@db:5432/postgres
"
depends_on
:
-
standalone
-
webserver
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