-
Notifications
You must be signed in to change notification settings - Fork 0
/
pi_docker-compose.yml
242 lines (232 loc) · 5.73 KB
/
pi_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
version: '3.8'
services:
redis:
container_name: redis
image: "redis:${REDIS_VERSION}"
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
- appendonly=yes
- TZ=${TZ}
- LANG=en_US.UTF-8
command:
--requirepass "${REDIS_INITDB_ROOT_PASSWORD}"
# entrypoint: [ "redis-server", "./redis/redis.conf" ]
ports:
- "${REDIS_HOST_PORT}:6379"
volumes:
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
- redis_data:/data
redisinsight:
image: 'redislabs/redisinsight:latest'
container_name: redisinsight
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- 8001:8001
volumes:
- redisinsight_data:/db:rw
mysql:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
security_opt:
- seccomp:unconfined
volumes:
- mysql_data:/var/lib/mysql
- ./mysql/my.cnf:/etc/my.cnf:ro
- ./mysql/log:/var/log/mysql
ports:
- "${MYSQL_HOST_PORT}:3306"
image: mysql:${MYSQL_VERSION}
container_name: mysql
### PHP-FPM ##############################################
php82:
container_name: php82
image: wzc1411520/php:8.2.4
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
depends_on:
- redis
- mysql
- es
- rabbitmq
links:
- redis
- mysql
- es
- rabbitmq
ports:
- '9000:9000'
volumes:
- ../applications:/server:rw
- ./php8.2/php/php.ini:/usr/local/etc/php/php.ini:ro
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.11.11
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
RABBITMQ_NODENAME: rabbitmq
volumes:
- ./rabbitmq/enabled_plugins:/etc/rabbitmq/enabled_plugins
- ./rabbitmq/conf.d/20-management_agent.disable_metrics_collector.conf:/etc/rabbitmq/conf.d/20-management_agent.disable_metrics_collector.conf
- ./rabbitmq/definitions.json:/etc/rabbitmq/definitions.json
- ./rabbitmq/rabbitmq.config:/etc/rabbitmq/rabbitmq.config
- ./rabbitmq/cert/hzztai.pem:/cert/hzztai.pem:ro
- ./rabbitmq/cert/hzztai.key:/cert/hzztai.key:ro
- rabbitmq_data:/var/lib/rabbitmq
ports:
- "5672:5672"
- "15674:15674"
- "15672:15672"
- "15675:15675"
es:
container_name: es
image: elasticsearch:${ELASTICSEARCH_VERSION}
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
environment:
TZ: ${TZ}
LANG: en_US.UTF-8
discovery.type: single-node
ES_JAVA_OPTS: "-Xmx512m -Xms512m"
ELASTIC_PASSWORD: "${ELASTICSEARCH_ROOT_PASSWORD}" # elastic账号密码
volumes:
- ./es/ik/:/usr/share/elasticsearch/plugins/ik:rw
- ./es/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- es_data:/usr/share/elasticsearch/data
ports:
- "${ELASTICSEARCH_HOST_PORT_C}:9200"
nginx:
image: nginx:1.22.1
container_name: nginx
restart: always
environment:
TZ: ${TZ}
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "80-90:80-90"
depends_on:
- php82
links:
- php82
volumes:
- ../applications:/server:rw
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
# - ./nginx/cert:/etc/nginx/cert:ro
portainer:
restart: always
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
image: portainer/portainer
environment:
TZ: ${TZ}
ports:
- "9100:9000"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- portainer_data:/data
container_name: portainer
# supervisord:
# restart: always
# logging:
# driver: json-file
# options:
# max-size: "100M"
# max-file: "10"
# environment:
# - TZ=${TZ}
# depends_on:
# - redis
# - es
# - rabbitmq
# links:
# - redis
# - es
# - rabbitmq
# volumes:
# - ../:/server:rw
# - ./php/php.ini:/usr/local/etc/php/php.ini:ro
# - ./php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
# - ./php/supervisor/supervisord.conf:/etc/supervisor/supervisord.conf:ro
# - ./php/policy.xml:/etc/ImageMagick-6/policy.xml
# image: zengfa/php:72
# container_name: supervisord
# entrypoint: /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
go:
container_name: go
image: golang
restart: always
tty: true
logging:
driver: json-file
options:
max-size: "100M"
max-file: "10"
ports:
- "8280-8290:8280-8290"
links:
- mysql
- redis
volumes:
- ../go-lang/src:/go/src:rw
mongo:
image: percona/percona-server-mongodb:3.6
# (case sensitive) engine: mmapv1, rocksdb, wiredTiger, inMemory
command: --storageEngine=wiredTiger
restart: always
environment:
- MONGO_INITDB_DATABASE=xhprof
volumes:
- ./mongo.init.d:/docker-entrypoint-initdb.d
- mongodb_data:/data/db
ports:
- "27017:27017"
volumes:
mysql_data:
driver: local
es_data:
driver: local
redis_data:
driver: local
rabbitmq_data:
driver: local
redisinsight_data:
driver: local
portainer_data:
driver: local
mongodb_data:
driver: local