-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
202 lines (194 loc) · 4.8 KB
/
docker-compose-dev.yml
File metadata and controls
202 lines (194 loc) · 4.8 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
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
# Requires Docker Compose v2
name: scholarspace-dev
services:
rails:
container_name: rails
hostname: rails
build:
dockerfile: Dockerfile-dev
context: .
target: scholarspace-dev
args:
- EXTRA_APK_PACKAGES=git less
- BUNDLE_GEMFILE=Gemfile
- VALKYRIE_METADATA_ADAPTER=fedora_metadata
- VALKYRIE_STORAGE_ADAPTER=fedora_storage
command: "./bin/rails server -p 3000 -b 0.0.0.0"
restart: unless-stopped
stdin_open: true
user: 8983:8983
tty: true
env_file:
- .env
environment:
- RAILS_ROOT=/app/scholarspace
ports:
- "3000:3000"
volumes:
- dev-storage:/app/scholarspace/storage
- dev-derivatives:/app/scholarspace/derivatives
- dev-uploads:/app/scholarspace/uploads
- ./public:/app/scholarspace/public
- dev-tmp:/app/scholarspace/tmp
networks:
- ss-dev
worker:
container_name: worker
hostname: worker
build:
dockerfile: Dockerfile-dev
context: .
target: scholarspace-dev-worker
args:
- EXTRA_APK_PACKAGES=git less
- BUNDLE_GEMFILE=Gemfile
- VALKYRIE_METADATA_ADAPTER=fedora_metadata
- VALKYRIE_STORAGE_ADAPTER=fedora_storage
command: sh -c 'bundle exec sidekiq'
restart: unless-stopped
user: 8983:8983
env_file:
- .env
depends_on:
- fits
- memcached
- postgres
- redis
- solr
- fedora
volumes:
- dev-storage:/app/scholarspace/storage
- dev-derivatives:/app/scholarspace/derivatives
- dev-uploads:/app/scholarspace/uploads
- dev-tmp:/app/scholarspace/tmp
networks:
- ss-dev
nginx:
container_name: nginx
hostname: nginx
image: "nginx:latest"
ports:
- 443:443
- 80:80
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./nginx/certs:/etc/ssl
restart: unless-stopped
depends_on:
- rails
networks:
- ss-dev
fedora:
container_name: fedora
hostname: fedora
image: fcrepo/fcrepo:6.5.1-tomcat9
restart: unless-stopped
environment:
- >-
CATALINA_OPTS=-Dfcrepo.home=/fcrepo-home -Djava.awt.headless=true -Dfile.encoding=UTF-8
-server -Xms1G -Xmx2G -XX:NewSize=256m -XX:MaxNewSize=1G
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/mem
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
-Dfcrepo.pid.minter.length=2 -Dfcrepo.pid.minter.count=4
-Dfcrepo.jms.enabled=false -Dfcrepo.metrics.enable=true
- JAVA_OPTS=-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dfcrepo.pid.minter.length=2 -Dfcrepo.pid.minter.count=4
volumes:
- dev-fedora:/fcrepo-home
ports:
- 8080:8080
networks:
- ss-dev
postgres:
image: postgres:15-alpine
container_name: postgres
hostname: postgres
env_file:
- .env
volumes:
- dev-db:/var/lib/postgresql/data
networks:
- ss-dev
ports:
- "5432:5432"
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 30s
timeout: 5s
retries: 5
fits:
container_name: fits
hostname: fits
image: ghcr.io/samvera/fitsservlet:1.6.0
ports:
- 8081
networks:
- ss-dev
restart: unless-stopped
memcached:
image: bitnami/memcached
networks:
- ss-dev
restart: unless-stopped
redis:
container_name: redis
hostname: redis
image: bitnami/redis:latest
env_file:
- .env
volumes:
- dev-redis:/bitnami/redis/data
networks:
- ss-dev
healthcheck:
test: ["CMD", "redis-cli", "ping"]
restart: unless-stopped
solr:
container_name: solr
hostname: solr
image: solr:8.11
user: 8983:8983
command:
- sh
- "-c"
- "precreate-core scholarspace_test /opt/solr/server/configsets/hyraxconf; solr-precreate scholarspace_dev /opt/solr/server/configsets/hyraxconf"
volumes:
- dev-solr_home:/var/solr/data:cached
- dev-derivatives:/app/scholarspace/derivatives
- ./solr/conf:/opt/solr/server/configsets/hyraxconf
- ./solr/plugins:/opt/solr/contrib/plugins
ulimits:
nofile:
soft: 65536
hard: 524288
networks:
- ss-dev
ports:
- 8983
healthcheck:
test:
[
"CMD-SHELL",
"wget --no-verbose --spider --tries=1 localhost:8983 || exit 1",
]
interval: 30s
timeout: 5s
retries: 20
restart: unless-stopped
volumes:
dev-db:
dev-storage:
dev-derivatives:
dev-uploads:
dev-public:
dev-tmp:
dev-redis:
dev-fedora:
sidekiq-public:
sidekiq-tmp:
dev-solr_home:
networks:
ss-dev:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-ss-dev