-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
174 lines (158 loc) · 4.15 KB
/
Copy pathdocker-compose.yml
File metadata and controls
174 lines (158 loc) · 4.15 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
version: '3.9'
services:
backend:
build:
context: .
dockerfile: Dockerfile.dev
ports:
- "8080:8080"
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- admission-net
restart: on-failure
volumes:
- ./scripts:/scripts:ro
- .:/app
frontend:
build:
context: ./ui
dockerfile: Dockerfile.dev
ports:
- "8081:5173"
environment:
- VITE_API_TARGET=http://backend:8080
volumes:
- ./ui:/app
- /app/node_modules
depends_on:
- backend
networks:
- admission-net
restart: on-failure
# PostgreSQL with pgvector extension (default database)
postgres:
image: pgvector/pgvector:pg17
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: admission
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 10
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- admission-net
# CockroachDB (alternative database - uncomment to use)
# cockroachdb:
# image: cockroachdb/cockroach:latest-v23.1
# ports:
# - "26257:26257"
# - "9080:8080"
# command: start-single-node --insecure
# healthcheck:
# test: [ "CMD", "curl", "-f", "http://localhost:8080/health?ready=1" ]
# interval: 5s
# timeout: 5s
# retries: 10
# volumes:
# - cockroach-data:/cockroach/cockroach-data
# networks:
# - admission-net
redis:
image: redis:7.0-alpine
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- admission-net
minio:
image: minio/minio:RELEASE.2025-09-07T16-13-09Z
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}
MINIO_API_CORS_ALLOW_ORIGIN: "*"
# Configure Redis notification target 'PRIMARY'
MINIO_NOTIFY_REDIS_ENABLE_PRIMARY: "on"
MINIO_NOTIFY_REDIS_ADDRESS_PRIMARY: "redis:6379"
MINIO_NOTIFY_REDIS_KEY_PRIMARY: "document:uploads"
MINIO_NOTIFY_REDIS_FORMAT_PRIMARY: "access"
volumes:
- minio-data:/data
command: server /data --console-address ":9001"
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:9000/minio/health/live" ]
interval: 30s
timeout: 20s
retries: 3
depends_on:
- redis
networks:
- admission-net
createbuckets:
image: minio/mc
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c " /usr/bin/mc alias set myminio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}; /usr/bin/mc admin info myminio --json; /usr/bin/mc mb myminio/${S3_BUCKET} || echo 'Bucket already exists'; /usr/bin/mc policy set private myminio/${S3_BUCKET}; /usr/bin/mc event remove myminio/${S3_BUCKET} --force || echo 'No events to remove'; /usr/bin/mc event add myminio/${S3_BUCKET} arn:minio:sqs::PRIMARY:redis --event put; /usr/bin/mc event list myminio/${S3_BUCKET}; exit 0; "
networks:
- admission-net
worker:
build:
context: .
dockerfile: Dockerfile.worker
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
minio:
condition: service_healthy
env_file:
- .env
environment:
REDIS_ADDR: "redis:6379"
REDIS_STREAM: "document:uploads"
REDIS_GROUP: "rag-indexing-worker"
NEO4J_URI: "bolt://neo4j:7687"
NEO4J_USER: "neo4j"
NEO4J_PASSWORD: "password"
networks:
- admission-net
restart: on-failure
volumes:
- .:/app
neo4j:
image: neo4j:5.26.0
ports:
- "7474:7474"
- "7687:7687"
environment:
NEO4J_AUTH: neo4j/password
volumes:
- neo4j-data:/data
networks:
- admission-net
volumes:
postgres-data: # cockroach-data: # Uncomment if using CockroachDB
redis-data:
minio-data:
neo4j-data:
networks:
admission-net:
driver: bridge