-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
172 lines (161 loc) · 3.94 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
version: '3'
volumes:
solr:
solr8:
db:
db-fcrepo:
app:
clam_db:
networks:
internal:
services:
clamav:
image: clamav/clamav:stable
expose:
- 3310
networks:
internal:
volumes:
- clam_db:/var/lib/clamav
fcrepo:
image: ualbertalib/docker-fcrepo4:4.7
expose:
- 8080
depends_on:
- fcrepodb
networks:
internal:
environment:
- CATALINA_OPTS=-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -Dfcrepo.home=/data -Dfcrepo.object.directory=/data/objects -Dfcrepo.binary.directory=/data/binaries -Dfcrepo.postgresql.username=$POSTGRES_USER -Dfcrepo.postgresql.password=$POSTGRES_PASSWORD -Dfcrepo.postgresql.host=$POSTGRES_HOST_FCREPO -Dfcrepo.postgresql.port=$POSTGRES_PORT -Dfcrepo.modeshape.configuration=classpath:/config/jdbc-postgresql/repository.json
solr:
image: solr:7
expose:
- 8983
ports:
- 8983:8983
env_file:
- .env
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost:8983/solr/"]
interval: 30s
timeout: 5s
retries: 3
networks:
internal:
volumes:
- solr:/opt/solr/server/solr/mycores
- ./hyrax/solr/config:/opt/solr/solr_conf
command:
- sh
- "-c"
- "precreate-core hydra-test /opt/solr/solr_conf; solr-precreate ${SOLR_CORE} /opt/solr/solr_conf"
solr8:
image: solr:8
expose:
- 8983
ports:
- 8987:8983
env_file:
- .env
environment:
- OOM=script
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost:8987/solr/"]
interval: 30s
timeout: 5s
retries: 3
networks:
internal:
volumes:
- solr8:/var/solr
- ./hyrax/solr8/conf:/opt/solr/solr_conf
command:
- sh
- "-c"
- "precreate-core ${SOLR_TEST_CORE} /opt/solr/solr_conf; solr-precreate ${SOLR_CORE} /opt/solr/solr_conf"
db: &db
image: postgres:11-alpine
networks:
internal:
env_file:
- .env
expose:
- 5432
fcrepodb:
<<: *db
environment:
- POSTGRES_DB=${POSTGRES_DB_FCREPO}
volumes:
- db-fcrepo:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "POSTGRES_PASSWORD=${POSTGRES_PASSWORD} pg_isready -U ${POSTGRES_USER} -h localhost -d ${POSTGRES_DB_FCREPO}"]
interval: 30s
timeout: 5s
retries: 3
appdb:
<<: *db
environment:
- POSTGRES_DB=${POSTGRES_DB_APP}
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "POSTGRES_PASSWORD=${POSTGRES_PASSWORD} pg_isready -U ${POSTGRES_USER} -h localhost -d ${POSTGRES_DB_APP}"]
interval: 30s
timeout: 5s
retries: 3
app: &app
build:
context: hyrax
args:
RAILS_ENV: ${RAILS_ENV}
UPLOADS_PATH: ${UPLOADS_PATH}
DOWNLOADS_PATH: ${DOWNLOADS_PATH}
DERIVATIVES_PATH: ${DERIVATIVES_PATH}
CACHE_PATH: ${CACHE_PATH}
FITS_PATH: ${FITS_PATH}
FITS_VERSION: ${FITS_VERSION}
env_file:
- .env
volumes:
- app:${UPLOADS_PATH}
- app:${DERIVATIVES_PATH}
- app:${DOWNLOADS_PATH}
- app:${CACHE_PATH}
- app:${BRAND_PATH}
networks:
internal:
web:
<<: *app
command: bash -c "/bin/docker-entrypoint.sh"
environment:
- VIRTUAL_HOST=nims.docker
- VIRTUAL_PORT=3000
depends_on:
- appdb
- solr
- solr8
- fcrepo
- redis
expose:
- 3000
workers:
<<: *app
command: bundle exec sidekiq
depends_on:
- appdb
- solr
- solr8
- fcrepo
- redis
redis:
image: redis:5
command: redis-server --appendonly yes
expose:
- 6379
networks:
internal:
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 30s
timeout: 5s
retries: 3