-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
204 lines (194 loc) · 4.71 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
services:
### Nginx Web Container ###
nginx:
build: ./core/images/nginx
container_name: nginx
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./core/conf/nginx/conf/nginx.conf:/etc/nginx/nginx.conf:ro
- ./core/conf/nginx/conf/conf.d:/etc/nginx/conf.d:ro
- ./web-conf:/etc/nginx/web-conf:ro
- ./logs/nginx/log:/var/log/nginx:rw
- type: bind
source: ./share-files
target: /var/www/share-files
ports:
- "80:80"
- "443:443"
restart: always
networks:
- net-all
### PHP FPM Container ###
php81:
build: ./core/images/php81
container_name: php81
volumes:
- type: bind
source: ./www
target: /var/www/html
- ./core/conf/php81/conf/php.ini-development:/usr/local/etc/php/php.ini:ro
- ./core/conf/php81/conf/php-fpm.conf:/usr/local/etc/php-fpm.conf:ro
- ./core/conf/php81/conf/php-fpm.d/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
# - type: bind
# source: ../.ssh
# target: /root/.ssh
- type: bind
source: ./share-files
target: /var/www/share-files
expose:
- "9000"
restart: always
networks:
- net-all
### Mariadb Container ###
# mariadb:
# build: ./core/images/mariadb
# container_name: mariadb
# volumes:
# # - type: volume
# # source: data-mariadb
# # target: /var/lib/mysql
# # volume:
# # nocopy: true
# # - ./core/conf/mysql/conf/my.cnf:/etc/mysql/my.cnf:ro
# - type: bind
# source: ./share-files
# target: /var/www/share-files
# ports:
# - "3306:3306"
# restart: always
# environment:
# MARIADB_ROOT_PASSWORD: 123456
# networks:
# - net-all
### Mysql8.0 Container ###
mysql80:
build: ./core/images/mysql80
container_name: mysql80
volumes:
- type: volume
source: data-mysql80
target: /var/lib/mysql
volume:
nocopy: true
# - ./core/conf/mysql/conf/my.cnf:/etc/mysql/my.cnf:ro
- type: bind
source: ./share-files
target: /var/www/share-files
ports:
- "3306:3306"
restart: always
environment:
MYSQL_ROOT_PASSWORD: 123456
networks:
- net-all
### OpenSearch Container ###
# opensearch:
# build: ./core/images/opensearch
# container_name: opensearch
# environment:
# - discovery.type=single-node
# - bootstrap.memory_lock=true
# - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
# ulimits:
# memlock:
# soft: -1
# hard: -1
# volumes:
# - data-opensearch:/usr/share/opensearch/data
# ports:
# - "9200:9200"
# restart: always
# networks:
# - net-all
### Elasticsearch7 Container ###
# elasticsearch7:
# build: ./core/images/elasticsearch
# container_name: elasticsearch7
# environment:
# - discovery.type=single-node
# - bootstrap.memory_lock=true
# - "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
# - xpack.security.enabled=false
# mem_limit: 2g
# ulimits:
# memlock:
# soft: -1
# hard: -1
# volumes:
# - data-elasticsearch7:/usr/share/elasticsearch/data
# ports:
# - "9200:9200"
# restart: always
# networks:
# - net-all
### Elasticsearch8 Container ###
elasticsearch8:
build: ./core/images/elasticsearch8
container_name: elasticsearch8
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms1g -Xmx1g"
- xpack.security.enabled=false
mem_limit: 2g
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data-elasticsearch8:/usr/share/elasticsearch/data
ports:
- "9200:9200"
# - "9300:9300"
restart: always
networks:
- net-all
### Redis Container ###
redis:
build: ./core/images/redis
container_name: redis
volumes:
- data-redis:/data
ports:
- "6379:6379"
restart: always
networks:
- net-all
### Rabbitmq Container ###
rabbitmq:
build: ./core/images/rabbitmq
container_name: rabbitmq
volumes:
- data-rabbitmq:/data
ports:
- "15672:15672"
- "5672:5672"
restart: always
environment:
- RABBITMQ_DEFAULT_USER=root
- RABBITMQ_DEFAULT_PASS=123456
networks:
- net-all
### Networks ###
networks:
net-all:
driver: bridge
### Volumes ###
volumes:
data-mariadb:
driver: local
data-mysql80:
driver: local
data-redis:
driver: local
data-rabbitmq:
driver: local
data-opensearch:
driver: local
data-elasticsearch7:
driver: local
data-elasticsearch8:
driver: local