-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
95 lines (87 loc) · 2.25 KB
/
docker-compose.yml
File metadata and controls
95 lines (87 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: '3.8'
name: niby
# Common environment variables for pgvector configuration
x-common-pgvector-env: &common-pgvector-env
QUARKUS_DATASOURCE_JDBC_URL: jdbc:postgresql://pgvector:5432/postgres
QUARKUS_DATASOURCE_USERNAME: postgres
QUARKUS_DATASOURCE_PASSWORD: postgres
PGVECTOR_DIMENSION: 384
PGVECTOR_TABLE: niby.nifi_doc_embeddings
services:
pgvector:
image: pgvector/pgvector:pg16
container_name: niby-pgvector
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- pgvector-data:/var/lib/postgresql/data
- ./niby-rag/db/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- niby-network
niby-be-core:
build:
context: ./niby-be-core
dockerfile: src/main/docker/Dockerfile.jvm
container_name: niby-be-core
environment:
<<: *common-pgvector-env
QUARKUS_HTTP_PORT: 8080
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
QUARKUS_HTTP_CORS_ORIGINS: http://localhost:8081,http://niby-ui:8081
ports:
- "8080:8080"
networks:
- niby-network
depends_on:
- pgvector
niby-rag:
build:
context: ./niby-rag
dockerfile: src/main/docker/Dockerfile.jvm
container_name: niby-rag
environment:
<<: *common-pgvector-env
QUARKUS_HTTP_PORT: 8082
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
DOCUMENTS_DIRECTORY: /app/documents
PGVECTOR_CREATE_TABLE: true
PGVECTOR_DROP_TABLE_FIRST: true
ports:
- "8082:8082"
volumes:
- ./niby-rag/nifi-doc:/app/documents:ro
networks:
- niby-network
depends_on:
pgvector:
condition: service_healthy
niby-ui:
build:
context: ./niby-ui
dockerfile: src/main/docker/Dockerfile.jvm
container_name: niby-ui
environment:
QUARKUS_HTTP_PORT: 8081
NIBY_BACKEND_HOST: niby-be-core
NIBY_BACKEND_PORT: 8080
ports:
- "8081:8081"
networks:
- niby-network
depends_on:
- niby-be-core
volumes:
pgvector-data:
driver: local
networks:
niby-network:
driver: bridge