-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
77 lines (77 loc) · 2.18 KB
/
docker-compose.yml
File metadata and controls
77 lines (77 loc) · 2.18 KB
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
version: '3'
services:
nsqlookupd:
image: nsqio/nsq
command: /nsqlookupd
ports:
- ${NSQLOOKUPD_TCP_POST}:4160
- ${NSQLOOKUPD_HTTP_POST}:4161
nsqd:
image: nsqio/nsq
command: /nsqd --broadcast-address=127.0.0.1 --lookupd-tcp-address=nsqlookupd:${NSQLOOKUPD_TCP_POST}
depends_on:
- nsqlookupd
ports:
- ${NSQD_TCP_PORT}:4150
- ${NSQD_HTTP_PORT}:4151
nsqadmin:
image: nsqio/nsq
command: /nsqadmin --lookupd-http-address=nsqlookupd:4161
depends_on:
- nsqlookupd
ports:
- ${NSQD_ADMIN_HTTP_PORT}:4171
mysql:
image: mysql:${MYSQL_VERSION}
container_name: mysql_${MYSQL_VERSION}
ports:
- ${REAL_MYSQL_PORT}:3306
# command:
# --character-set-server=utf8mb4
# --collation-server=utf8mb4_general_ci
# --explicit_defaults_for_timestamp=true
# --lower_case_table_names=1
# --max_allowed_packet=128M
# --sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO"
volumes:
- ${MYSQL_DIR}/data:/var/lib/mysql
- ${MYSQL_DIR}/my.cnf:/mysql/my.cnf
- ${MYSQL_DIR}/logs:/logs
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_HOST: ${MYSQL_ROOT_HOST}
logging:
driver: "json-file"
options:
max-size: "200m"
max-file: "3"
restart: always
redis:
image: redis:${REDIS_VERSION}
container_name: redis_${REDIS_VERSION}
ports:
- ${REAL_REDIS_PORT}:6379
volumes:
- ${REDIS_DIR}/data:/data
- ${REDIS_DIR}/redis.conf:/redis/redis.conf
- ${REDIS_DIR}/logs:/logs
logging:
driver: "json-file"
options:
max-size: "200m"
max-file: "3"
restart: always
command: ["redis-server", "/redis/redis.conf"]
etcd:
build:
context: ./etcd # 指定构建使用的 Dockerfile 文件
environment:
- TZ=${TZ}
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
ports: # 设置端口映射
- "${ETCD_PORT}:2379"
# networks:
# - backend
restart: always