forked from teamgram/teamgram-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-env.yaml
146 lines (137 loc) · 3.83 KB
/
docker-compose-env.yaml
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
version: "3"
######## 项目依赖的环境,启动项目之前要先启动此环境 #######
######## The environment that the project depends on, starting this environment before starting the project #######
services:
#zookeeper是kafka的依赖 - Zookeeper is the dependencies of Kafka
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
volumes:
- ./data/zookeeper/data:/data
- /etc/localtime:/etc/localtime
restart: always
ports:
- 127.0.0.1:2181:2181
networks:
- teamgram_net
#消息队列 - Message queue
kafka:
image: wurstmeister/kafka
container_name: kafka
ports:
- 127.0.0.1:9092:9092
environment:
#TZ: Asia/Shanghai
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_CREATE_TOPICS: "Inbox-T:1:0,Sync-T:1:0"
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
restart: always
volumes:
- ./data/kafka/data:/data
networks:
- teamgram_net
depends_on:
- zookeeper
etcd:
image: quay.io/coreos/etcd:v3.5.2
ports:
- 127.0.0.1:2379:2379
- 127.0.0.1:2380:2380
container_name: etcd
volumes:
- ./data/etcd/data:/data
- /etc/timezone:/etc/timezone
- /etc/localtime:/etc/localtime:ro
environment:
ETCDCTL_API: 3
ETCD_DATA_DIR: /data
ETCD_NAME: node1
INITIAL_CLUSTER_TOKEN: etcd-test-cluster
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd:2380
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_ADVERTISE_CLIENT_URLS: http://etcd:2379
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_INITIAL_CLUSTER: node1=http://etcd:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_AUTO_COMPACTION_RETENTION: 1
restart: always
command: /usr/local/bin/etcd
networks:
- teamgram_net
redis:
image: redis
container_name: redis
ports:
- 127.0.0.1:6379:6379
volumes:
- ./data/redis/data:/data:rw
#redis config file
#- ./deploy/redis/config/redis.conf:/usr/local/redis/config/redis.conf
environment:
TZ: Europe/Moscow
restart: always
privileged: true
command: redis-server --appendonly yes
networks:
- teamgram_net
mysql:
image: mysql:5.7
container_name: mysql
environment:
# 时区上海 - Time zone Shanghai (Change if needed)
#TZ: Asia/Shanghai
# root 密码 - root password
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-my_root_secret}
MYSQL_DATABASE: teamgram
MYSQL_USER: teamgram
MYSQL_PASSWORD: ${DB_PASSWORD:-teamgram}
# MYSQL_ALLOW_EMPTY_PASSWORD: "true"
ports:
- 127.0.0.1:3306:3306
volumes:
# 数据挂载 - Data mounting
- ./data/mysql/data:/var/lib/mysql
- ./teamgramd/sql:/docker-entrypoint-initdb.d/
#- /etc/localtime:/etc/localtime
# 日志
command:
--default-authentication-plugin=mysql_native_password
--character-set-server=utf8mb4
--collation-server=utf8mb4_general_ci
--explicit_defaults_for_timestamp=true
--lower_case_table_names=1
privileged: true
restart: always
networks:
- teamgram_net
minio:
image: minio/minio
container_name: minio
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
volumes:
- ./data/minio/data:/data
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: miniostorage
command: server /data --console-address ":9001"
restart: always
networks:
- teamgram_net
minio_mc:
image: minio/mc:latest
container_name: minio_mc
volumes:
- ./minio_init.sh:/minio_init.sh
entrypoint: /minio_init.sh
networks:
- teamgram_net
networks:
teamgram_net:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16