Доавление векторного поиска и репликации

This commit is contained in:
2026-01-29 00:42:30 +03:00
parent 09d5739256
commit 657f1b96f2
19 changed files with 448 additions and 71 deletions
+50 -3
View File
@@ -1,6 +1,6 @@
services:
db:
image: postgres:17
image: pgvector/pgvector:pg17
container_name: db
restart: unless-stopped
logging:
@@ -11,6 +11,8 @@ services:
- ./data/db:/var/lib/postgresql/data
networks:
- proxy
ports:
- 5432:5432
env_file:
- ./.env
healthcheck:
@@ -19,6 +21,49 @@ services:
timeout: 5s
retries: 5
replication-setup:
image: postgres:17-alpine
container_name: replication-setup
restart: "no"
networks:
- proxy
env_file:
- ./.env
volumes:
- ./setup-replication.sh:/setup-replication.sh
entrypoint: ["/bin/sh", "/setup-replication.sh"]
depends_on:
api:
condition: service_started
db:
condition: service_healthy
llm:
image: ollama/ollama:latest
container_name: llm
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "3"
volumes:
- ./data/llm:/root/.ollama
networks:
- proxy
# ports:
# - 11434:11434
env_file:
- ./.env
healthcheck:
test: ["CMD-SHELL", "curl http://localhost:11434"]
interval: 10s
timeout: 5s
retries: 5
deploy:
resources:
limits:
memory: 5g
api:
build: .
container_name: api
@@ -30,8 +75,8 @@ services:
max-file: "3"
networks:
- proxy
ports:
- 8000:8000
# ports:
# - 8000:8000
env_file:
- ./.env
volumes:
@@ -39,6 +84,8 @@ services:
depends_on:
db:
condition: service_healthy
llm:
condition: service_healthy
networks:
proxy: # Рекомендуется использовать через реверс-прокси