-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
255 lines (240 loc) · 6.35 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
version: '3'
services:
gitlab:
image: gitlab/gitlab-ce
container_name: gitlab
env_file: .env
environment:
TZ: 'Asia/Shanghai'
GITLAB_OMNIBUS_CONFIG: |
external_url '${GITLAB_URL}'
gitlab_rails['time_zone'] = 'Asia/Shanghai'
gitlab_rails['gitlab_shell_ssh_port'] = ${GITLAB_HOST_SSH_PORT}
restart: always
ports:
- "${GITLAB_HOST_HTTPS_PORT}:443"
- "${GITLAB_HOST_HTTP_PORT}:80"
- "${GITLAB_HOST_SSH_PORT}:22"
volumes:
- ./gitlab/config:/etc/gitlab
- ./gitlab/data:/var/opt/gitlab
- ./gitlab/logs:/var/log/gitlab
nginx:
restart: always
image: docker.io/library/nginx:latest
environment:
TZ: 'Asia/Shanghai'
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- ./nginx/logs:/var/log/nginx
- ./nginx/conf:/etc/nginx/sites
ports:
- "80:80"
- "8080:8080"
- "8088:8088"
privileged: true
mysql:
restart: always
build:
context: ./mysql
args:
- MYSQL_VERSION=5.7
environment:
- MYSQL_DATABASE=fastadmin
- MYSQL_USER=omg_user
- MYSQL_PASSWORD=omg_8d495ab570
- MYSQL_ROOT_PASSWORD=root
- TZ=Asia/Shanghai
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf:/etc/mysql
ports:
- "${MYSQL_PORT}:3306"
jenkins:
restart: always
build:
context: ./jenkins
env_file: .env
environment:
TZ: Asia/Shanghai
ports:
- ${JENKINS_HOST_SLAVE_AGENT_PORT}:50000
- ${JENKINS_HOST_HTTP_PORT}:8080
privileged: true
volumes:
- ./jenkins/home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
mongo:
image: mongo:latest
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=123456
volumes:
- ./mongo/db:/data/db
- ./mongo/config:/data/configdb
privileged: true
elasticsearch7:
image: elasticsearch:7.11.2
container_name: elasticsearch7
ports:
- 9200:9200
- 9300:9300
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1048m -Xmx1048m"
- TZ=Asia/Shanghai
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./es/data:/usr/share/elasticsearch/data
privileged: true
skywalking-oap:
image: apache/skywalking-oap-server:8.9.1
container_name: skywalking-oap
depends_on:
- elasticsearch7
links:
- elasticsearch7
restart: always
ports:
- 11800:11800
- 12800:12800
environment:
SW_STORAGE: elasticsearch # 指定ES版本
SW_STORAGE_ES_CLUSTER_NODES: elasticsearch7:9200
TZ: Asia/Shanghai
skywalking-ui:
image: apache/skywalking-ui:8.9.1
container_name: skywalking-ui
depends_on:
- skywalking-oap
links:
- skywalking-oap
restart: always
ports:
- 18080:8080
environment:
SW_OAP_ADDRESS: http://skywalking-oap:12800
TZ: Asia/Shanghai
registrator:
image: gliderlabs/registrator:latest
restart: always
container_name: registrator
network_mode: host
volumes:
- /var/run/docker.sock:/tmp/docker.sock
command: " -ip ${HOST_IP} consul://${HOST_IP}:8500"
privileged: true
consul-server:
image: consul:latest
restart: always
container_name: consul-server
environment:
TZ: 'Asia/Shanghai'
SERVICE_TAGS: 'Consul Server'
ports:
- 8300:8300
- 8301:8301
- 8301:8301/udp
- 8302:8302
- 8500:8500
- 8600:8600
- 8600:8600/udp
command: "agent -server -bootstrap -ui -data-dir=/opt/consul -node=${HOST_NAME} -client=0.0.0.0 -advertise=${HOST_IP}"
volumes:
- ./consul/data:/opt/consul
privileged: true
consul-client:
image: consul:latest
restart: always
container_name: consul-client
environment:
TZ: 'Asia/Shanghai'
SERVICE_TAGS: 'Consul Client'
ports:
- 8300:8300
- 8301:8301
- 8301:8301/udp
- 8302:8302
- 8500:8500
- 8600:8600
- 8600:8600/udp
command: "agent -data-dir=/opt/consul -node=${HOST_NAME} -client=0.0.0.0 -join=${CONSUL_SERVER} -advertise=${HOST_IP}"
volumes:
- ./consul/data:/opt/consul
privileged: true
pyserver:
build:
context: ./web
container_name: pyserver
environment:
# 服务发现、健康检查
- SERVICE_30002_NAME=service_web1
- SERVICE_30002_CHECK_HTTP=/
- SERVICE_30002_CHECK_INTERVAL=5s
- SERVICE_30002_CHECK_TIMEOUT=1s
- SERVICE_30003_NAME=service_web2
- SERVICE_30003_CHECK_HTTP=/
- SERVICE_30003_CHECK_INTERVAL=5s
- SERVICE_30003_CHECK_TIMEOUT=1s
- HOST_IP=${HOST_IP}
- SW_OAP_ADDRESS=${SW_OAP_ADDRESS}
restart: always
privileged: true
ports:
- 30002:30002
- 30003:30003
command:
"/usr/bin/supervisord"
volumes:
- ./web/supervisor:/etc/supervisor/conf.d
- ./web/workspace:/app
- ./web/logs:/var/log/supervisor/
rabbitmq:
image: rabbitmq:3.8.11-management
container_name: rabbitmq
restart: always
hostname: rabbitmq
ports:
- 15672:15672
- 5672:5672
volumes:
- ./rabbitmq/data:/var/lib/rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=root
privileged: true
openresty:
build:
context: ./openresty
container_name: openresty
restart: always
privileged: true
ports:
- 8088-8092:8088-8092
volumes:
- ./openresty/nginx/conf:/etc/nginx/conf.d
- /home/wwwroot:/home/wwwroot
- /home/wwwlogs/nginx:/home/wwwlogs/nginx
- ./openresty/nginx/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
sonarqube:
image: sonarqube:7.8-community
restart: always
container_name: sonarqube
privileged: true
ports:
- 19000:9000
environment:
- SONARQUBE_JDBC_USERNAME=root
- SONARQUBE_JDBC_PASSWORD=QyYLa7P6FAyzih3P
- SONARQUBE_JDBC_URL=jdbc:mysql://192.168.1.130:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance&useSSL=false
volumes:
- ./sonarqube/conf:/opt/sonarqube/conf
- ./sonarqube/data:/opt/sonarqube/data
- ./sonarqube/extensions:/opt/sonarqube/extensions
- ./sonarqube/logs:/opt/sonarqube/logs