-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1.16 KB
/
docker-compose.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
version: '3.8'
services:
backend:
image: "unitmesh/chocolate-factory:latest"
container_name: backend
ports:
- "18080:18080"
environment:
- OPENAI_API_KEY=xxxx
- OPENAI_API_HOST=https://api.openai.com/
- ELASTICSEARCH_URIS=elasticsearch:9200
frontend:
image: "unitmesh/chocolate-factory-frontend:latest"
container_name: frontend
depends_on:
- backend
ports:
- "3000:3000"
nginx:
build: ./nginx
container_name: nginx
depends_on:
- frontend
- backend
ports:
- "8080:80"
restart: always
elasticsearch:
image: elasticsearch:7.17.4
container_name: elasticsearch
restart: always
environment:
# 开启内存锁定
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g"
# 指定单节点启动
- discovery.type=single-node
ulimits:
# 取消内存相关限制 用于开启内存锁定
memlock:
soft: -1
hard: -1
volumes:
- ./data:/usr/share/elasticsearch/data
- ./logs:/usr/share/elasticsearch/logs
- ./plugins:/usr/share/elasticsearch/plugins
ports:
- "9200:9200"