-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
113 lines (105 loc) · 3.31 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
composer:
build: config/docker/php/composer
volumes:
- ./composer.json:/scripts/composer.json:rw
# - ./composer.lock:/scripts/composer.lock:rw
- ./bin:/scripts/bin:rw
volumes_from:
- vendor
vendor:
build: config/docker/php/vendor
volumes:
- ./vendor/:/scripts/vendor/
behat:
build: config/docker/php/behat
volumes:
- ./behat.yml:/scripts/behat.yml/:ro
- ./src:/scripts/src/:ro
- ./features:/scripts/features/:rw
volumes_from:
- vendor
links:
- mysql_master
- mysql_slave_1
- mysql_slave_2
- mysql_slave_3
- postgresql_master
- postgresql_slave_1
- postgresql_slave_2
- postgresql_slave_3
mysql_master:
image: mariadb:10.2
volumes:
- ./config/docker/db/my.cnf:/etc/mysql/conf.d/docker.cnf
- ./config/docker/db/init-mysql-master.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
MYSQL_DATABASE: db
MYSQL_USER: master_user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpassword
mysql_slave_1:
image: mariadb:10.2
volumes:
- ./config/docker/db/my.cnf:/etc/mysql/conf.d/docker.cnf
- ./config/docker/db/init-mysql-slave.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
MYSQL_DATABASE: db
MYSQL_USER: slave_user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpassword
mysql_slave_2:
image: mariadb:10.2
volumes:
- ./config/docker/db/my.cnf:/etc/mysql/conf.d/docker.cnf
- ./config/docker/db/init-mysql-slave.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
MYSQL_DATABASE: db
MYSQL_USER: slave_user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpassword
mysql_slave_3:
image: mariadb:10.2
volumes:
- ./config/docker/db/my.cnf:/etc/mysql/conf.d/docker.cnf
- ./config/docker/db/init-mysql-slave.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
MYSQL_DATABASE: db
MYSQL_USER: slave_user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpassword
postgresql_master:
image: postgres:10
volumes:
- ./config/docker/db/init-pgsql-master.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
POSTGRES_DB: db
POSTGRES_USER: master_user
POSTGRES_PASSWORD: password
POSTGRES_ROOT_PASSWORD: password
postgresql_slave_1:
image: postgres:10
volumes:
- ./config/docker/db/init-pgsql-slave.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
POSTGRES_DB: db
POSTGRES_USER: slave_user
POSTGRES_PASSWORD: password
POSTGRES_ROOT_PASSWORD: password
postgresql_slave_2:
image: postgres:10
volumes:
- ./config/docker/db/init-pgsql-slave.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
POSTGRES_DB: db
POSTGRES_USER: slave_user
POSTGRES_PASSWORD: password
POSTGRES_ROOT_PASSWORD: password
postgresql_slave_3:
image: postgres:10
volumes:
- ./config/docker/db/init-pgsql-slave.sql:/docker-entrypoint-initdb.d/init.sql:ro
environment:
POSTGRES_DB: db
POSTGRES_USER: slave_user
POSTGRES_PASSWORD: password
POSTGRES_ROOT_PASSWORD: password