forked from lmnr-ai/lmnr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-local-build.yml
128 lines (119 loc) · 3.4 KB
/
docker-compose-local-build.yml
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
# This compose definition builds Laminar images locally. This is meant to be
# run at the last step of local development as a check before pushing changes.
name: lmnr
services:
qdrant:
image: qdrant/qdrant
volumes:
- type: volume
source: qdrant-data
target: /data
rabbitmq:
image: rabbitmq
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 7s
timeout: 5s
retries: 3
clickhouse:
build:
context: ./clickhouse
container_name: clickhouse
volumes:
- type: volume
source: clickhouse-data
target: /var/lib/clickhouse/
- type: volume
source: clickhouse-logs
target: /var/log/clickhouse-server/
cap_add:
- SYS_NICE
- NET_ADMIN
- IPC_LOCK
ulimits:
nofile:
soft: 262144
hard: 262144
semantic-search-service:
build:
context: ./semantic-search-service
container_name: semantic-search-service
depends_on:
- qdrant
environment:
- PORT=8080
- QDRANT_URL=http://qdrant:6334
- COHERE_ENDPOINT=https://api.cohere.ai/v1/embed
- COHERE_API_KEY=${COHERE_API_KEY}
postgres:
image: postgres:16
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}", "-d", "${POSTGRES_DB}"]
interval: 2s
timeout: 5s
retries: 5
python-executor:
build:
context: ./python-executor
container_name: python-executor
app-server:
build:
context: ./app-server
args:
DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
container_name: app-server
depends_on:
semantic-search-service:
condition: service_started
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
clickhouse:
condition: service_started
python-executor:
condition: service_started
environment:
- PORT=8000
- GRPC_PORT=8001
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- SEMANTIC_SEARCH_URL=http://semantic-search-service:8080
- RABBITMQ_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq:5672/%2f
- SHARED_SECRET_TOKEN=${SHARED_SECRET_TOKEN}
- CLICKHOUSE_URL=http://clickhouse:8123
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
- CODE_EXECUTOR_URL=http://python-executor:8811
- ENVIRONMENT=FULL
frontend:
build:
context: ./frontend
container_name: frontend
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
clickhouse:
condition: service_started
environment:
- PORT=3000
- BACKEND_URL=http://app-server:8000
- SHARED_SECRET_TOKEN=${SHARED_SECRET_TOKEN}
- DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
- ENVIRONMENT=FULL
- CLICKHOUSE_URL=http://clickhouse:8123
- CLICKHOUSE_USER=${CLICKHOUSE_USER}
volumes:
qdrant-data:
clickhouse-data:
clickhouse-logs:
postgres-data: