-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
198 lines (189 loc) · 5.16 KB
/
docker-compose.yml
File metadata and controls
198 lines (189 loc) · 5.16 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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
services:
postgres:
image: postgres:15-alpine
container_name: rag-agent-postgres
environment:
POSTGRES_USER: raguser
POSTGRES_PASSWORD: ragpassword
POSTGRES_DB: ragdb
ports:
- "5435:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U raguser -d ragdb" ]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: rag-agent-redis
ports:
- "6379:6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
server:
build:
context: ./server
dockerfile: Dockerfile
container_name: rag-agent-server
ports:
- "8083:8080"
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: raguser
DB_PASSWORD: ragpassword
DB_NAME: ragdb
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ""
REDIS_DB: 0
ROOM_SFU_ENABLED: "false"
ROOM_SFU_PROVIDER: livekit
ROOM_SFU_REQUIRE_MEMBERSHIP: "true"
ROOM_SFU_MAX_PARTICIPANTS: "50"
ROOM_SFU_MAX_SUBSCRIPTIONS: "9"
ROOM_SFU_VIDEO_PRESET: balanced
ROOM_SFU_DYNACAST_ENABLED: "true"
ROOM_SFU_ADAPTIVE_STREAM_ENABLED: "true"
ROOM_SFU_SIMULCAST_ENABLED: "true"
ROOM_SFU_TOKEN_TTL_MINUTES: "15"
LIVEKIT_API_KEY: devkey
LIVEKIT_API_SECRET: secret
LIVEKIT_WS_URL: ws://livekit:7880
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
feed-worker:
build:
context: ./server
dockerfile: Dockerfile
container_name: rag-agent-feed-worker
command: ["./feed-worker"]
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: raguser
DB_PASSWORD: ragpassword
DB_NAME: ragdb
FEED_WORKER_ENABLED: "true"
FEED_REBUILD_INTERVAL_SEC: "300"
FEED_REBUILD_LIMIT: "120"
FEED_REBUILD_BATCH_SIZE: "200"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
media-worker:
build:
context: ./server
dockerfile: Dockerfile
container_name: rag-agent-media-worker
command: ["./media-worker"]
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: raguser
DB_PASSWORD: ragpassword
DB_NAME: ragdb
REDIS_HOST: redis
REDIS_PORT: 6379
REDIS_PASSWORD: ""
REDIS_DB: 0
S3_ENDPOINT: ${S3_ENDPOINT:-}
S3_REGION: ${S3_REGION:-}
S3_ACCESS_KEY: ${S3_ACCESS_KEY:-}
S3_SECRET_KEY: ${S3_SECRET_KEY:-}
S3_BUCKET_NAME: ${S3_BUCKET_NAME:-}
S3_PUBLIC_URL: ${S3_PUBLIC_URL:-}
MEDIA_WORKER_ENABLED: "true"
MEDIA_WORKER_INTERVAL_SEC: "30"
MEDIA_WORKER_MAX_RETRIES: "2"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
dating-moderation-worker:
build:
context: ./server
dockerfile: Dockerfile
container_name: rag-agent-dating-moderation-worker
command: ["./dating-moderation-worker"]
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_USER: raguser
DB_PASSWORD: ragpassword
DB_NAME: ragdb
API_OPEN_AI: ${API_OPEN_AI:-}
GEMINI_API_KEY: ${GEMINI_API_KEY:-}
GEMINI_CORPUS_ID: ${GEMINI_CORPUS_ID:-}
DATING_MODERATION_WORKER_ENABLED: "true"
DATING_MODERATION_WORKER_INTERVAL_SEC: "30"
DATING_MODERATION_WORKER_BATCH_SIZE: "10"
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
lkm:
build:
context: ./lkm
dockerfile: Dockerfile
args:
NEXT_PUBLIC_API_URL: http://localhost:8083/api
container_name: rag-agent-lkm
ports:
- "3006:3000"
depends_on:
- server
restart: unless-stopped
coturn:
image: coturn/coturn
container_name: rag-agent-turn
restart: always
ports:
- "3478:3478/tcp"
- "3478:3478/udp"
- "49152-49162:49152-49162/udp"
command: >
-n --log-file=stdout --min-port=49152 --max-port=49162 --realm=vedamatch.ru --external-ip=$TURN_EXTERNAL_IP --listening-port=3478 --user=$TURN_USER:$TURN_PASSWORD
environment:
- TURN_EXTERNAL_IP=45.150.9.229
- TURN_USER=admin
- TURN_PASSWORD=krishna1284radha
- EXTERNAL_IP=127.0.0.1 # IMPORTANT: Change to public IP in production
# Secret for REST API (Time Limited Credentials)
- STATIC_AUTH_SECRET=p2psecretkey123
livekit:
image: livekit/livekit-server@sha256:2c13cbf2edcbf13ea7b20d05c10b394d04d8fb3fe358269cff845a90b4de9576
container_name: rag-agent-livekit
restart: unless-stopped
profiles: ["sfu"]
command:
- --node-ip
- 127.0.0.1
- --udp-port
- "7882"
ports:
- "7880:7880"
- "7881:7881"
- "7882:7882/udp"
environment:
LIVEKIT_KEYS: "devkey: secret"
LIVEKIT_PORT: "7880"
LIVEKIT_LOG_LEVEL: debug
LIVEKIT_REGION: local
LIVEKIT_NODE_IP: 127.0.0.1
LIVEKIT_USE_EXTERNAL_IP: "false"
volumes:
postgres_data: