-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
131 lines (122 loc) · 3.11 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
version: '3'
volumes:
solr:
db:
db-fcrepo:
app:
networks:
internal:
services:
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-alpine
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
- ./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"
db: &db
image: postgres:11-alpine
networks:
internal:
env_file:
- .env
ports:
- 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: .
args:
RAILS_ENV: ${RAILS_ENV}
UPLOADS_PATH: ${UPLOADS_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:${CACHE_PATH}
networks:
internal:
web:
<<: *app
command: bash -c "/bin/docker-entrypoint.sh"
environment:
- VIRTUAL_HOST=hyrax.docker
- VIRTUAL_PORT=3000
depends_on:
- appdb
- solr
- fcrepo
- redis
expose:
- 3000
workers:
<<: *app
command: bundle exec sidekiq
depends_on:
- appdb
- solr
- 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