-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
80 lines (69 loc) · 1.59 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
---
x-condition-healthy: &healthy
condition: service_healthy
x-healthcheck-defaults: &healthcheck-defaults
interval: 5s
timeout: 10s
start_period: 10s
retries: 5
x-common-service: &common-service
build:
context: .
target: base
volumes:
- .:/usr/src/app
- gem_cache:/gems
- ./example/datasets:/tmp/datasets
environment:
REDIS_URL: redis://redis/
PREVIEW_EMAIL: true
services:
test:
<<: *common-service
restart: never
command: bundle exec rspec
depends_on:
redis: *healthy
mariadb-test: *healthy
processor:
<<: *common-service
restart: always
command: bundle exec sidekiq -r ./lib/datasets/sidekiq_jobs.rb
depends_on:
redis: *healthy
mariadb-dev: *healthy
sidekiq_web:
<<: *common-service
restart: always
command: bundle exec puma bin/sidekiq_web.ru
depends_on:
redis: *healthy
ports:
- 9292:9292
queuer:
<<: *common-service
restart: never
command: bin/datasets.rb
depends_on:
redis: *healthy
mariadb-dev: *healthy
mariadb-dev: &mariadb
image: ghcr.io/hathitrust/db-image
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysqlroot
MYSQL_DATABASE: ht
MYSQL_USER: datasets
MYSQL_PASSWORD: datasets
healthcheck:
<<: *healthcheck-defaults
test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
mariadb-test: *mariadb
redis:
image: redis
restart: always
healthcheck:
<<: *healthcheck-defaults
test: ["CMD", "redis-cli", "ping"]
volumes:
gem_cache: