-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
136 lines (121 loc) · 3.17 KB
/
docker-compose.yml
File metadata and controls
136 lines (121 loc) · 3.17 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
---
services:
database:
image: postgres:14-alpine
container_name: database
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: "p0tat0 precious polym3r chimes"
PODMAN_USERNS: keep-id
volumes:
# normally this would be :Z on selinux systems however
# this appears to interfere with the right selinux context
# being set on the container. :Z means the container should get
# its own context and be the only one that can access the mount
# :z means other containers in this compose file can access
# the mount
- ./dbinit:/docker-entrypoint-initdb.d/:z
healthcheck:
test: pg_isready -U postgres -h 127.0.0.1
interval: 5s
redis:
image: redis:5-bullseye
container_name: redis
ports:
- 6379:6379
healthcheck:
test: redis-cli ping
interval: 1s
timeout: 3s
retries: 10
# this is designed merely to be 'inherited' from so we arent'
# repeating ourselves with the rails and sidekiq containers
base-app: &base-app
image: rwgrim/docker-noop
volumes:
# see above; any :Z seems to break the postgres container
- ./:/app/:z
- ingest-transactions:/transactions:z
depends_on:
database:
condition: service_healthy
redis:
condition: service_healthy
solr1:
condition: service_healthy
secrets:
- trln-ingest-db-pw
environment:
OS_ENV: container
DB_HOST: database
DB_USER: ainsworth
REDIS_URL: redis://redis:6379
SOLR_URL: http://solr1:8983/solr/
TRANSACTION_FILES_BASE: /transactions
app: &app
<<: *base-app
container_name: spofford
image: ingestapp
build: .
command: server
ports:
- 3000:3000
depends_on:
- solr1
- redis
- database
sidekiq:
<<: *base-app
image: ingestapp
command: sidekiq
solr1:
image: trln-ingest-solr:latest
container_name: solr1
build:
context: solr-docker
ports:
- 8983:8983
environment:
- ZK_HOST=zoo1:2181
- SOLR_MODULES=analysis-extras,trln
depends_on:
- zoo1
healthcheck:
test: ['CMD-SHELL', 'curl -sf http://localhost:8983/solr/admin/collections?action=list' ]
volumes:
- ./solr-docker/plugins:/trln-modules
- ./solr-docker/config:/trlnbib-config:z
- ./solr-docker/initscripts:/docker-entrypoint-initdb.d:Z
zoo1:
image: zookeeper:3.6.2
container_name: zoo1
restart: always
#hostname: zoo1
ports:
- 2181:2181
- 7001:7000
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:388;2181
ZOO_4LW_COMMANDS_WHITELIST: mntr, conf, ruok
solr_config_loader:
image: solr:9
container_name: config_loader
depends_on:
- solr1
environment:
- SOLR_HOST=solr1
command:
- bash
- "-e"
- "-x"
- "-c"
- "wait-for-solr.sh --max-attempts 10 --wait-seconds 5 --solr-url http://$$SOLR_HOST:8983/; solr create_collection -c trlnbib -d /trlnbib-config -p 8983"
volumes:
- ./solr-docker/config:/trlnbib-config
secrets:
trln-ingest-db-pw:
file: .db-password
volumes:
ingest-transactions: