-
Notifications
You must be signed in to change notification settings - Fork 261
/
Copy pathdocker-compose.yaml
92 lines (88 loc) · 2.14 KB
/
docker-compose.yaml
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
services:
# redis服务
redis:
image: 'redis:latest'
restart: always
ports:
- '6379:6379'
command: redis-server --save 20 1 --loglevel warning --requirepass A6UBxB4igUNxPRfx3CpYutH353VYo8Atpc
volumes:
- ./docker/redis/data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 10s
retries: 3
mysql:
image: 'mysql:8.0'
restart: always
environment:
MYSQL_USER: "open_scrm_demo"
MYSQL_PASSWORD: "A6UBxB4igUNxPRfx3CpYutH353VYo8Atpc"
MYSQL_DATABASE: "open_scrm_demo"
MYSQL_ROOT_PASSWORD: "A6UBxB4igUNxPRfx3CpYutH353VYo8Atpc"
ports:
- '3306:3306'
volumes:
- ./docker/mysql/data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 5
# # nginx服务,前端项目挂载在此处
# nginx:
# image: nginx:1.14-alpine
# restart: always
# privileged: true
# environment:
# - TZ=Asia/Shanghai
# ports:
# - 9000:9000
# volumes:
# - ./docker/nginx/conf/conf.d/:/etc/nginx/conf.d/
# - ./docker/nginx/logs:/var/log/nginx
# - ./docker/dashboard:/opt/dashboard
# - ./docker/sidebar:/opt/sidebar
# - ./docker/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
# depends_on:
# - api-server
# # 主Api服务
# api-server:
# image: centos
# volumes:
# - ./bin/api-server:/srv/api-server
# - ./conf/:/conf/
# ports:
# - 9001:9001
# command:
# - sh
# - -c
# - |
# /srv/api-server
# depends_on:
# mysql:
# condition: service_healthy
# redis:
# condition: service_healthy
# # 会话存档服务
# msg-archive-server:
# image: centos
# volumes:
# - ./bin/msg-arch-server:/srv/msg-arch-server
# - ./docker/lib:/srv/lib
# - ./conf/:/conf/
# ports:
# - 9002:9002
# environment:
# - LD_LIBRARY_PATH=/srv/lib
# command:
# - sh
# - -c
# - |
# /srv/msg-arch-server
# depends_on:
# mysql:
# condition: service_healthy
# redis:
# condition: service_healthy