-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathdocker-compose-sdb.yaml
51 lines (51 loc) · 1.37 KB
/
docker-compose-sdb.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
version: "2.3"
services:
etcd:
image: docker.io/bitnami/etcd:3
container_name: etcd
environment:
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_NAME=etcd
- ETCD_INITIAL_ADVERTISE_PEER_URLS=http://etcd:2380
- ETCD_LISTEN_PEER_URLS=http://0.0.0.0:2380
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
- ETCD_INITIAL_CLUSTER_TOKEN=etcd-cluster
- ETCD_INITIAL_CLUSTER=etcd=http://etcd:2380
- ETCD_INITIAL_CLUSTER_STATE=new
networks:
- local
ports:
- "2379:2379"
mysql:
image: mysql:8.0
container_name: dbpack-mysql
networks:
- local
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: "123456"
volumes:
- ./scripts/init.sql:/docker-entrypoint-initdb.d/init.sql:rw
command: ['mysqld', '--character-set-server=utf8mb4', '--collation-server=utf8mb4_unicode_ci']
dbpack:
build:
context: ${PWD}
dockerfile: ./docker/Dockerfile
container_name: dbpack
networks:
- local
ports:
- "13306:13306"
volumes:
- ./conf/config_sdb.yaml:/config.yaml
- ./scripts/wait-for-mysql.sh:/wait-for-mysql.sh
- /root/:/var/log/:rw
depends_on:
- etcd
- mysql
command: ["./wait-for-mysql.sh","--","/dbpack", "start", "-c", "config.yaml"]
networks:
local:
name: dbpack