-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
114 lines (99 loc) · 2.63 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
114
---
x-condition-healthy: &healthy
condition: service_healthy
x-healthcheck-defaults: &healthcheck-defaults
interval: 5s
timeout: 10s
start_period: 10s
retries: 5
x-holdings-container: &holdings-container-defaults
build:
context: .
target: dev
volumes:
- .:/usr/src/app
- gem_cache:/gems
command: bundle exec rspec
environment: &holdings-default-environment
MYSQL_CONNECTION_STRING: "mysql2://ht_repository:ht_repository@mariadb/ht_repository"
PUSHGATEWAY: http://pushgateway:9091
MONGOID_ENV: development
depends_on:
mariadb: *healthy
redis: *healthy
mongo_dev: *healthy
services:
test:
<<: *holdings-container-defaults
command: bundle exec rspec
environment:
<<: *holdings-default-environment
MONGOID_ENV: test
depends_on:
mongo_test: *healthy
mariadb: *healthy
redis: *healthy
dev: *holdings-container-defaults
phctl:
<<: *holdings-container-defaults
entrypoint: bundle exec ruby bin/phctl.rb
processor:
<<: *holdings-container-defaults
restart: always
volumes:
- .:/usr/src/app
- gem_cache:/gems
- ./example/datasets:/tmp/datasets
command: bundle exec sidekiq -c 1 -r ./lib/sidekiq_jobs.rb
mongo_dev:
image: mongo:6.0.2
command: --replSet rs0 --bind_ip localhost,mongo_dev
volumes:
- data_db:/data/db
- ./bin:/tmp/bin
healthcheck: &mongo-healthcheck
<<: *healthcheck-defaults
test: [ "CMD", "mongosh", "--quiet", "--eval", 'db.runCommand("ping").ok']
mongo_test:
image: mongo:6.0.2
command: --replSet rs0 --bind_ip localhost,mongo_test
volumes:
- ./bin:/tmp/bin
healthcheck: *mongo-healthcheck
mariadb:
image: mariadb
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 1
volumes:
- ./sql:/docker-entrypoint-initdb.d/
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
pushgateway:
image: prom/pushgateway
command:
- --web.enable-admin-api
ports:
- 9091:9091
healthcheck:
<<: *healthcheck-defaults
test: [ "CMD", "wget", "--quiet", "--tries=1", "-O", "/dev/null", "pushgateway:9091/-/healthy" ]
sidekiq_web:
<<: *holdings-container-defaults
restart: always
command: bundle exec puma bin/sidekiq_web.ru
depends_on:
redis: *healthy
ports:
- 9292:9292
environment:
REDIS_URL: redis://redis/
redis:
image: redis
restart: always
healthcheck:
<<: *healthcheck-defaults
test: ["CMD", "redis-cli","ping"]
volumes:
gem_cache:
data_db: