-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
98 lines (98 loc) · 3.17 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
###############################################################################
# Author: [email protected] #
###############################################################################
version: '3.1'
services:
dev_local_memcached:
image: memcached:1.5-alpine
container_name: dev_local_memcached_container
volumes:
# 配置时区
- ./base/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
ports:
- '11211:11211'
dev_local_redis:
image: redis:4.0-alpine
container_name: dev_local_redis_container
volumes:
- ./base/etc/redis:/etc/redis
- ./log/redis:/var/log/redis
- ./base/var/lib/redis:/var/lib/redis
- ./base/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
command: ['redis-server', '/etc/redis/redis.conf']
ports:
- '6379:6379'
dev_local_mongo:
image: mongo:4.0-xenial
container_name: dev_local_mongo_container
volumes:
- ./base/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
ports:
- '27017:27017'
dev_local_mysql_adminer:
image: adminer
container_name: dev_local_adminer_container
restart: always
ports:
- 8080:8080
dev_local_mysql:
image: mysql:5.7
container_name: dev_local_mysql_container
volumes:
- ./base/usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
- ./base/etc/mysql/conf.d:/etc/mysql/conf.d
# 强行指定编码
command:
[
'mysqld',
'--character-set-server=utf8mb4',
'--collation-server=utf8mb4_general_ci',
]
environment:
MYSQL_ROOT_PASSWORD: 123456
# MYSQL_USER: 'root'
MYSQL_PASSWORD: '123456'
MYSQL_DATABASE: 'fe_dev'
ports:
- '3306:3306'
dev_local_elasticsearch:
image: elasticsearch:6.6.2
container_name: dev_local_elasticsearch_container
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
- discovery.zen.minimum_master_nodes=2
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./data/esdata1:/usr/share/elasticsearch/data
- ./base/etc/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
ports:
- '9200:9200'
dev_local_elasticsearch2:
image: elasticsearch:6.6.2
container_name: dev_local_elasticsearch2_container
environment:
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- 'ES_JAVA_OPTS=-Xms512m -Xmx512m'
- discovery.zen.minimum_master_nodes=2
- 'discovery.zen.ping.unicast.hosts=dev_local_elasticsearch_container'
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- ./data/esdata2:/usr/share/elasticsearch/data
- ./base/etc/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
# dev_local_kibana:
# image: docker.elastic.co/kibana/kibana:6.6.2
# container_name: dev_local_kibana_container
# environment:
# # 这个hosts的配置必须要跟ES的container_name相同才能访问
# ELASTICSEARCH_HOSTS: http://dev_local_elasticsearch_container
# ports:
# - '5601:5601'