-
-
Notifications
You must be signed in to change notification settings - Fork 178
/
docker-compose-test.yml
116 lines (109 loc) · 2.9 KB
/
docker-compose-test.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
114
115
116
# This doesn't work yet
version: "3"
services:
postgres:
image: postgres
healthcheck:
test: psql postgres --command "select 1" -U postgres
# ports:
# - "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
init-postgres:
build: .
depends_on:
- postgres
environment:
DATABASE_ADAPTER: docker_compose_postgres
PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true'
volumes:
- ./lib:/home/lib
- ./db:/home/db
- ./tasks:/home/tasks
- ./Rakefile:/home/Rakefile
- ./config:/home/config
command: dockerize --wait tcp://postgres:5432 /home/init-db.sh
postgres-tests:
build: .
depends_on:
- postgres
environment:
DATABASE_ADAPTER: docker_compose_postgres
PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true'
volumes:
- ./lib:/home/lib
- ./spec:/home/spec
- ./db:/home/db
- ./config.ru:/home/config.ru
- ./tasks:/home/tasks
- ./Rakefile:/home/Rakefile
- ./config:/home/config
- ./.rspec:/home/.rspec
- ./.rubocop:/home/.rubocop
- ./.gitignore:/home/.gitignore
- ./public:/home/public
- ./docs:/home/docs
mysql:
image: mysql:5.7.28
#image: arm64v8/mysql # for m1 macs
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: pact_broker
MYSQL_DATABASE: pact_broker
MYSQL_USER: pact_broker
MYSQL_PASSWORD: pact_broker
# ports:
# - "3306:3306"
init-mysql:
build: .
depends_on:
- mysql
environment:
DATABASE_ADAPTER: docker_compose_mysql
PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true'
volumes:
- ./lib:/home/lib
- ./db:/home/db
- ./tasks:/home/tasks
- ./Rakefile:/home/Rakefile
- ./config:/home/config
command: dockerize --wait tcp://mysql:3306 /home/init-db.sh
mysql-tests:
build: .
depends_on:
- mysql
environment:
DATABASE_ADAPTER: docker_compose_mysql
PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true'
volumes:
- ./lib:/home/lib
- ./spec:/home/spec
- ./db:/home/db
- ./config.ru:/home/config.ru
- ./tasks:/home/tasks
- ./Rakefile:/home/Rakefile
- ./config:/home/config
- ./.rspec:/home/.rspec
- ./.rubocop:/home/.rubocop
- ./.gitignore:/home/.gitignore
- ./public:/home/public
- ./docs:/home/docs
sqlite-tests:
build: .
environment:
PACT_BROKER_HIDE_PACTFLOW_MESSAGES: 'true'
volumes:
- ./lib:/home/lib
- ./spec:/home/spec
- ./db:/home/db
- ./config.ru:/home/config.ru
- ./tasks:/home/tasks
- ./Rakefile:/home/Rakefile
- ./config:/home/config
- ./.rspec:/home/.rspec
- ./.rubocop:/home/.rubocop
- ./.gitignore:/home/.gitignore
- ./public:/home/public
- ./docs:/home/docs