From 2d2668fd4685b5b0da3412cb72fbbb20aac5deec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=BB=BA=E5=B9=B3?= Date: Tue, 4 Mar 2025 11:23:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=B0=E6=96=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E8=AE=BE=E7=BD=AE=EF=BC=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=9B=B4=E5=BC=BA=E5=A4=A7=E7=9A=84pgvector=EF=BC=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + config.ini | 2 +- docker-compose.yaml | 23 +++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 7c9d120..7e0636d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ db.sqlite3 #pr_agent/ static/admin/ config.local.ini +pg \ No newline at end of file diff --git a/config.ini b/config.ini index 4c277de..23af7b5 100644 --- a/config.ini +++ b/config.ini @@ -9,5 +9,5 @@ DEFAULT = pg DB_NAME = pr_manager DB_USER = admin DB_PASSWORD = admin123456 -DB_HOST = 110.40.30.95 +DB_HOST = prpg DB_PORT = 5432 diff --git a/docker-compose.yaml b/docker-compose.yaml index ac5c78e..5c15dce 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,7 +1,27 @@ services: + # 数据库 + prpg: + image: pgvector/pgvector:pg17 + container_name: prpg + restart: always + environment: + - POSTGRES_DB=pr_manager + - POSTGRES_USER=admin + - POSTGRES_PASSWORD=admin123456 + ports: + - "10007:5432" + volumes: + - ./db:/var/lib/postgresql/data + logging: + driver: "json-file" + options: + max-size: "50M" + max-file: "1" + # nginx nginx: image: nginx:latest container_name: prnginx + restart: always depends_on: - backend ports: @@ -18,6 +38,9 @@ services: backend: image: pr_manager:latest container_name: backend + restart: always + depends_on: + - prpg command: sh start.sh ports: - "18000:18000"