forked from wvulibraries/hydra_acda_portal_public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
169 lines (160 loc) · 4.02 KB
/
docker-compose.dev.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
version: '3.4'
services:
app:
build:
context: ./
dockerfile: Dockerfile.dev
env_file:
- './env/env.dev.hydra'
volumes:
- ./hydra:/home/hydra
# map in various bash scripts
- ./scripts:/home/hydra/scripts
# map in various persistent directories in the data folder
- ./data/logs:/home/hydra/log
- ./data/pdf:/home/hydra/tmp/pdf
- ./data/thumbnails:/home/hydra/tmp/thumbnails
- ./data/images:/home/hydra/tmp/images
- ./data/bundle:/usr/local/bundle # cache bundle install
- ./data/node_modules:/home/hydra/node_modules
# map in various persistent directories in the tmp folder
- ./data/imports:/home/hydra/tmp/imports
- ./data/exports:/home/hydra/tmp/exports
- ./data/validations:/home/hydra/tmp/validations
- ./data/letter_opener:/home/hydra/tmp/letter_opener
# don't mount tmp directory
- /home/hydra/tmp
networks:
- hydra
web:
extends: app
container_name: acda_portal
command: bash -c "bundle install; sh ./scripts/startup.sh"
ports:
- "3000:3000"
depends_on:
redis:
condition: service_started
db:
condition: service_started
fcrepo:
condition: service_started
solr:
condition: service_started
workers:
condition: service_started
workers:
extends: app
container_name: sidekiq
command: bash -c "bundle install; bundle exec sidekiq -C config/sidekiq.yml"
depends_on:
redis:
condition: service_started
db:
condition: service_started
fcrepo:
condition: service_started
solr:
condition: service_started
stdin_open: true
tty: true
memcached:
image: bitnami/memcached
container_name: memcached
ports:
- "11211"
networks:
- hydra
redis:
image: redis:alpine
container_name: redis
command: redis-server
# command: redis-server /usr/local/etc/redis/redis.conf
ports:
- "127.0.0.1:6379:6379"
env_file:
- './env/env.dev.redis'
volumes:
- redis:/var/lib/redis/data
# - ./config/redis.conf:/usr/local/etc/redis/redis.conf
restart: unless-stopped
healthcheck:
test: redis-cli -h localhost -p 6379 -a $$REDIS_PASSWORD ping
interval: 30s
timeout: 3s
retries: 3
networks:
- hydra
fcrepo:
image: fcrepo/fcrepo:6.4.0
container_name: fcrepo
restart: always
ports:
- "8080:8080"
env_file:
- './env/env.fedora'
volumes:
- fcrepo:/usr/local/tomcat/fcrepo-home
logging:
options:
max-size: 50m
healthcheck:
test: "curl -f http://localhost:8080/fcrepo"
interval: 5s
timeout: 5s
retries: 20
depends_on:
- db
networks:
- hydra
solr:
container_name: solr
image: solr:9.5.0
restart: on-failure
env_file:
- './env/env.solr'
ports:
- "8983:8983"
user: root # run as root to change the permissions of the solr folder
# Change permissions of the solr folder, create a default core and start solr as solr user
command: bash -c "sh /scripts/startup.sh hydra_dev"
volumes:
- solr:/var/solr/data/hydra_dev/data
- ./data/logs/dev/:/var/solr/logs
- ./solr9-setup:/solr9-setup
- ./scripts/startup-solr.sh:/scripts/startup.sh
healthcheck:
test: "curl -f localhost:8983/solr/#/"
interval: 5s
timeout: 5s
retries: 20
networks:
- hydra
db:
container_name: db
image: postgres:16-alpine
expose:
- "5432"
env_file:
- './env/env.db'
volumes:
- postgres:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "fcrepo"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
networks:
- hydra
volumes:
postgres:
fcrepo:
redis:
solr:
networks:
hydra:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-hydra-ca