-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (56 loc) · 1.27 KB
/
docker-compose.yml
File metadata and controls
61 lines (56 loc) · 1.27 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
version: '3.8'
services:
excel-api:
build: .
container_name: excel-api
ports:
- "18081:18081"
environment:
- SPRING_PROFILES_ACTIVE=prod
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=
- EXCEL_STORAGE_PATH=/data/excel-files
- EXCEL_TEMP_PATH=/data/excel-temp
volumes:
- excel-data:/data
- excel-logs:/app/logs
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
networks:
- excel-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:18081/api/excel/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
redis:
image: redis:7-alpine
container_name: excel-redis
# 不映射到宿主机端口,只供内部服务使用
expose:
- "6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes
restart: unless-stopped
networks:
- excel-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
volumes:
excel-data:
driver: local
excel-logs:
driver: local
redis-data:
driver: local
networks:
excel-network:
driver: bridge