-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
179 lines (170 loc) · 4.26 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
170
171
172
173
174
175
176
177
178
179
version: '3.4'
# used for local testing
services:
app:
build:
context: ./
dockerfile: Dockerfile.dev
env_file:
- './env/env.dev.hyrax'
volumes:
- ./wvu_hyrax:/home/wvu_hyrax
- ./scripts:/home/wvu_hyrax/scripts
- ./data/logs:/home/wvu_hyrax/log
- imports:/home/wvu_hyrax/tmp/imports
- exports:/home/wvu_hyrax/tmp/exports
- uploads:/home/wvu_hyrax/tmp/uploads
- derivatives:/home/wvu_hyrax/tmp/derivatives
# added because we were using exports with bulkrax for testing atm
- ./data/hyrax-exports:/home/wvu_hyrax/imports
# folders that contain data not included in the git repo
# add seed csv files to db folder in a subfolder called data
- ./data/seed_files:/home/wvu_hyrax/db/data
- ./data/node_modules:/home/wvu_hyrax/node_modules
# add sftp upload directory
- ./data/sftp_uploads:/home/wvu_hyrax/sftp_uploads
# don't mount tmp directory
- /home/wvu_hyrax/tmp
networks:
- hyrax
web:
extends: app
container_name: hyrax
command: bash -c "bundle install; bundle exec rails s -p 3000 -b 0.0.0.0"
ports:
- "3000:3000"
restart: unless-stopped
healthcheck:
test: curl --fail -s http://localhost:3000/ || exit 1
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
depends_on:
- redis
- solr
- fcrepo
- db
- workers
workers:
extends: app
container_name: sidekiq
command: bash -c "bundle install; bundle exec sidekiq -C config/sidekiq.yml"
restart: unless-stopped
depends_on:
- redis
- solr
- fcrepo
- memcached
- db
# healthcheck:
# test: ["CMD", "bash", "/scripts/sidekiqmon.sh"]
# interval: 30s
# timeout: 60s
# retries: 5
# start_period: 80s
stdin_open: true
tty: true
memcached:
image: bitnami/memcached
container_name: memcached
expose:
- "11211"
networks:
- hyrax
redis:
image: redis:alpine
container_name: redis
env_file:
- './env/env.dev.redis'
command: /bin/sh -c "redis-server --requirepass $$REDIS_PASSWORD"
expose:
- "6379"
volumes:
- redis:/var/lib/redis/data
restart: always
healthcheck:
test: redis-cli -h redis ping
interval: 30s
timeout: 3s
retries: 3
networks:
- hyrax
fcrepo:
image: ghcr.io/scientist-softserv/docker-fcrepo:4.7.6-SNAPSHOT2
container_name: fcrepo
depends_on:
- db
env_file:
- './env/env.dev.fedora'
ports:
- "8080:8080"
volumes:
- fcrepo:/data:cached
restart: unless-stopped
healthcheck:
test: curl --fail -s http://localhost:8080/ || exit 1
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
networks:
- hyrax
solr:
container_name: solr
image: solr:8.11.1
# build:
# context: ./
# dockerfile: Dockerfile.solr
ports:
- "8983:8983"
command:
- sh
- "-c"
- "precreate-core hyrax_test /opt/solr/server/configsets/hyraxconf; solr-precreate hyrax_dev /opt/solr/server/configsets/hyraxconf"
- "&&"
- "chown -R 8983:8983 /var/solr"
volumes:
- ./wvu_hyrax/solr/conf:/opt/solr/server/configsets/hyraxconf/conf
- solr:/var/solr
restart: unless-stopped
healthcheck:
test: curl --fail -s http://localhost:8983/ || exit 1
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
networks:
- hyrax
db:
container_name: db
image: postgres:15.2-alpine
expose:
- "5432"
env_file:
- './env/env.dev.db'
volumes:
- postgres:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "postgres"]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
networks:
- hyrax
volumes:
uploads:
imports:
exports:
postgres:
redis:
solr:
derivatives:
fcrepo:
networks:
hyrax:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-hyrax-wvudr