-
Notifications
You must be signed in to change notification settings - Fork 230
/
docker-compose.yml
97 lines (93 loc) · 1.98 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
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
version: '3.3'
services:
llmbot:
image: sudoskys/llmbot:main
container_name: llmbot
volumes:
# 挂载配置目录 config_dir
- ./config_dir:/app/config_dir
deploy:
resources:
limits:
# 保证至多有 0.90 个 CPU 和 4000MB 内存
cpus: '0.90'
memory: 4000M
reservations:
memory: 1000M
depends_on:
- redis
- rabbitmq
- mongodb
environment:
AMQP_DSN: amqp://admin:8a8a8a@rabbitmq:5672
REDIS_DSN: redis://redis:6379/0
MONGODB_DSN: mongodb://admin:8a8a8a@mongodb:27017/?authSource=admin
env_file:
- .env
networks:
- app-tier
logging:
driver: "json-file"
options:
max-size: "50m"
max-file: "3"
rabbitmq:
image: rabbitmq:3-management
container_name: rabbit
hostname: rabbitmq
restart: on-failure
ports:
- "15672:15672"
- "5672:5672"
environment:
TZ: Asia/Shanghai
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: 8a8a8a
volumes:
- ./rabbitmq:/var/lib/rabbitmq
networks:
- app-tier
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
container_name: redis-server
image: redis:7
restart: on-failure
environment:
- TZ=Asia/Shanghai
volumes:
- ./redis:/data
ports:
- "6379:6379"
networks:
- app-tier
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
mongodb:
container_name: mongodb-server
image: mongo:7
restart: on-failure
environment:
- TZ=Asia/Shanghai
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=8a8a8a
volumes:
- ./mongodb:/data/db
ports:
- "27017:27017"
networks:
- app-tier
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
networks:
app-tier:
driver: bridge