-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
139 lines (133 loc) · 3.45 KB
/
docker-compose.yml
File metadata and controls
139 lines (133 loc) · 3.45 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
services:
app:
build:
context: .
dockerfile: Dockerfile
target: runtime
env_file:
- .env.docker
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
elasticsearch:
condition: service_healthy
volumes:
- uploads-data:/app/uploads
command: ["/bin/sh", "-c", "bunx prisma migrate deploy && bun start"]
restart: unless-stopped
realtime:
image: oven/bun:1
working_dir: /app
env_file:
- .env.docker
command: ["bun", "--bun", "src/realtime/server.ts"]
ports:
- "3005:3005"
depends_on:
redis:
condition: service_healthy
volumes:
- .:/app
- collab-data:/app/data/collab
restart: unless-stopped
profiles:
- realtime
postgres:
image: postgres:15-alpine
environment:
POSTGRES_USER: knowledge
POSTGRES_PASSWORD: knowledge
POSTGRES_DB: knowledge_network
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U knowledge"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
redis:
image: redis:7-alpine
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.3
environment:
- node.name=es-node-01
- cluster.name=knowledge-search-cluster
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.monitoring.collection.enabled=true
- http.cors.enabled=true
- http.cors.allow-origin=*
- http.cors.allow-headers=X-Requested-With,Content-Type,Content-Length,Authorization
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- es-data:/usr/share/elasticsearch/data
- ./docker/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml:ro
- ./docker/config/synonyms.txt:/usr/share/elasticsearch/config/synonyms.txt:ro
ports:
- "9200:9200"
- "9300:9300"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9200/_cluster/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
restart: unless-stopped
kibana:
image: docker.elastic.co/kibana/kibana:8.11.3
environment:
- SERVERNAME=kibana
- ELASTICSEARCH_HOSTS=http://elasticsearch:9200
- ELASTICSEARCH_USERNAME=kibana_system
- ELASTICSEARCH_PASSWORD=changeme
- xpack.security.enabled=false
- telemetry.enabled=false
- monitoring.ui.enabled=true
ports:
- "5601:5601"
depends_on:
elasticsearch:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:5601/api/status || exit 1"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s
restart: unless-stopped
profiles:
- observability
volumes:
uploads-data:
collab-data:
postgres-data:
redis-data:
es-data: