-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (73 loc) · 1.99 KB
/
Copy pathdocker-compose.yml
File metadata and controls
78 lines (73 loc) · 1.99 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
# 生产编排:nginx 反代 + UburNode + Elasticsearch(单节点)
# 服务器 git pull 后本地 build app 镜像(与 intelligent_reimbursement 相同模式)
services:
nginx:
image: nginx:1.27-alpine
container_name: uburnode-nginx
ports:
- "8001:80" # 宿主机 80 已被宝塔 nginx 占用
volumes:
- ./deploy/nginx/uburnode.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
app:
condition: service_started
restart: unless-stopped
app:
build:
context: .
dockerfile: Dockerfile
args:
HF_ENDPOINT: https://hf-mirror.com
image: uburnode-app:local
container_name: uburnode-app
env_file:
- .env
environment:
ES_NODE: http://elasticsearch:9200
REDIS_URL: redis://redis:6379/0
volumes:
- hf_cache:/data/huggingface
- ./logs:/app/logs # 宿主机可直接看项目目录 logs/YYYY-MM-DD_ubur_log
deploy:
resources:
limits:
memory: 2560M
depends_on:
elasticsearch:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
redis:
image: redis:7.4-alpine
container_name: uburnode-redis
command: ["redis-server", "--save", "", "--appendonly", "no"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
restart: unless-stopped
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.0
container_name: uburnode-es
environment:
discovery.type: single-node
xpack.security.enabled: "false"
ES_JAVA_OPTS: -Xms512m -Xmx512m
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- es_data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl -sf http://127.0.0.1:9200/_cluster/health || exit 1"]
interval: 10s
timeout: 5s
retries: 12
start_period: 40s
restart: unless-stopped
volumes:
es_data:
hf_cache: