-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
159 lines (159 loc) · 4.14 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
version: "3"
services:
# php-fpm:
# container_name: php-fpm
# image: "${DOCKER_USER}/php-fpm:${PHP_VERSION}"
# build:
# context: ${DOCKERFILE_DIR}/php${PHP_VERSION}
# dockerfile: Dockerfile
# ports:
# - 9000:9000
# volumes:
# - ${DOCKER_LOGS_DIR}/php${PHP_VERSION}:/var/log/php
# - ${WEBROOT_DIR}:/var/www/html
# - ${DOCKERFILE_DIR}/php${PHP_VERSION}/etc:/usr/local/etc
# networks:
# - local-test
nginx:
image: "nginx:latest"
container_name: nginx
ports:
- 80:80
- 443:443
environment:
TZ: Asia/Shanghai
volumes:
- ${DOCKERFILE_DIR}/nginx/conf/conf.d:/etc/nginx/conf.d
- ${DOCKERFILE_DIR}/nginx/conf/nginx.conf:/etc/nginx/nginx.conf
- ${DOCKERFILE_DIR}/nginx/conf/fastcgi_params:/etc/nginx/fastcgi_params
- ${DOCKERFILE_DIR}/nginx/conf/mime.types:/etc/nginx/mime.types
- ${DOCKER_LOGS_DIR}/nginx:/var/log/nginx
- ${WEBROOT_DIR}:/var/www/html
networks:
- local-test
mysql:
image: mysql:8.0
container_name: mysql
ports:
- 3306:3306
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: root
volumes:
- ${DOCKERFILE_DIR}/mysql${MYSQL_VERSION}/conf:/etc/mysql/conf.d
- ${DOCKER_LOGS_DIR}/mysql${MYSQL_VERSION}:/logs
- ${DOCKER_DATA_DIR}/mysql${MYSQL_VERSION}:/var/lib/mysql
networks:
- local-test
redis:
image: redis:7.0
container_name: redis-server
ports:
- 6379:6379
environment:
TZ: Asia/Shanghai
volumes:
- ${DOCKERFILE_DIR}/redis70/conf:/etc/redis
- ${DOCKER_DATA_DIR}/redis70:/data
command: ['redis-server', '/etc/redis/redis.conf']
networks:
- local-test
# rabbit:
# image: rabbitmq:3.9.11-management
# container_name: rabbitmq
# ports:
# - 5672:5672
# - 15672:15672
# environment:
# - TZ=Asia/Shanghai
# - RABBITMQ_DEFAULT_USER=${DOCKER_USER}
# - RABBITMQ_DEFAULT_PASS=${DOCKER_USER}
# volumes:
# - ${DOCKER_DATA_DIR}/rabbitmq:/var/lib/rabbitmq
# networks:
# - local-test
jaeger:
restart: always
image: jaegertracing/all-in-one:latest
container_name: jaeger
ports:
- 6831:6831/udp
- 6832:6832/udp
- 5778:5778
- 16686:16686
- 4317:4317
- 4318:4318
- 14250:14250
- 14268:14268
- 14269:14269
- 9411:9411
environment:
- COLLECTOR_ZIPKIN_HOST_PORT=:9411
- COLLECTOR_OTLP_ENABLED=true
networks:
- local-test
zookeeper:
restart: always
image: bitnami/zookeeper:latest
container_name: zookeeper
ports:
- 2181:2181
environment:
# 匿名登录--必须开启
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- local-test
kafka:
restart: always
image: bitnami/kafka:latest
container_name: kafka
ports:
- 9092:9092
- 9999:9999
environment:
- KAFKA_BROKER_ID=1
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092
# 客户端访问地址,更换成自己的
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
# 允许使用PLAINTEXT协议(镜像中默认为关闭,需要手动开启)
- ALLOW_PLAINTEXT_LISTENER=yes
# 关闭自动创建 topic 功能
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
# 全局消息过期时间 6 小时(测试时可以设置短一点)
- KAFKA_CFG_LOG_RETENTION_HOURS=6
# 开启JMX监控
- JMX_PORT=9999
depends_on:
- zookeeper
networks:
- local-test
kafka_manager:
restart: always
image: hlebalbau/kafka-manager:latest
container_name: kafka_manager
ports:
- 9900:9900
environment:
- ZK_HOSTS=zookeeper:2181
- APPLICATION_SECRET=letmein
depends_on:
- zookeeper
- kafka
networks:
- local-test
dtm:
image: yedf/dtm:latest
environment:
STORE_DRIVER: redis
STORE_HOST: localhost
STORE_USER:
STORE_PASSWORD: ''
STORE_PORT: 6379
ports:
- '36789:36789'
- '36790:36790'
networks:
local-test:
name: local-test
driver: bridge