-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
196 lines (189 loc) · 4.94 KB
/
Copy pathdocker-compose-prod.yml
File metadata and controls
196 lines (189 loc) · 4.94 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
# Requires Docker Compose v2
name: scholarspace-prod
services:
rails:
container_name: rails
hostname: rails
build:
dockerfile: Dockerfile-prod
context: .
target: scholarspace-prod
args:
- EXTRA_APK_PACKAGES=git less
- BUNDLE_GEMFILE=Gemfile
- VALKYRIE_METADATA_ADAPTER=fedora_metadata
- VALKYRIE_STORAGE_ADAPTER=fedora_storage
- RAILS_ENV=production
command: "./bin/rails server -p 3000 -b 0.0.0.0"
stdin_open: true
tty: true
user: root
env_file:
- .env
environment:
- RAILS_ROOT=/app/scholarspace
ports:
- "3000:3000"
volumes:
- prod-storage:/app/scholarspace/storage
- prod-derivatives:/app/scholarspace/derivatives
- prod-uploads:/app/scholarspace/uploads
- prod-public:/app/scholarspace/public
- prod-tmp:/app/scholarspace/tmp
restart: unless-stopped
networks:
- scholarspace
worker:
container_name: worker
hostname: worker
build:
dockerfile: Dockerfile-prod
context: .
target: scholarspace-prod-worker
args:
- EXTRA_APK_PACKAGES=git less
- BUNDLE_GEMFILE=Gemfile
- VALKYRIE_METADATA_ADAPTER=fedora_metadata
- VALKYRIE_STORAGE_ADAPTER=fedora_storage
- RAILS_ENV=production
command: sh -c 'bundle exec sidekiq RAILS_ENV=production'
user: root
restart: unless-stopped
env_file:
- .env
depends_on:
- fits
- memcached
- postgres
- redis
- solr
- fedora
volumes:
- prod-storage:/app/scholarspace/storage
- prod-derivatives:/app/scholarspace/derivatives
- prod-uploads:/app/scholarspace/uploads
- prod-public:/app/scholarspace/public
- prod-tmp:/app/scholarspace/tmp
networks:
- scholarspace
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:
- scholarspace
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 -Dfcrepo.aws.access-key=${AWS_ACCESS_KEY} -Dfcrepo.aws.secret-key=${AWS_SECRET_KEY} -Dfcrepo.storage=ocfl-s3 -Dfcrepo.aws.region=us-east-1 -Dfcrepo.ocfl.s3.bucket=${S3_BUCKET_NAME} -Dfcrepo.ocfl.s3.prefix=${S3_PREFIX}
- JAVA_OPTS=-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dfcrepo.pid.minter.length=2 -Dfcrepo.pid.minter.count=4
volumes:
- fedora:/fcrepo-home
ports:
- 8080:8080
networks:
- scholarspace
postgres:
image: postgres:15-alpine
container_name: postgres
hostname: postgres
env_file:
- .env
volumes:
- prod-db:/var/lib/postgresql/data
networks:
- scholarspace
ports:
- "5432:5432"
fits:
container_name: fits
hostname: fits
image: ghcr.io/samvera/fitsservlet:1.6.0
restart: unless-stopped
ports:
- 8080
networks:
- scholarspace
memcached:
image: bitnami/memcached
restart: unless-stopped
networks:
- scholarspace
redis:
container_name: redis
restart: unless-stopped
hostname: redis
image: bitnami/redis:latest
env_file:
- .env
volumes:
- redis:/bitnami/redis/data
networks:
- scholarspace
healthcheck:
test: ["CMD", "redis-cli", "ping"]
solr:
container_name: solr
hostname: solr
image: solr:8.11
restart: unless-stopped
command:
- sh
- "-c"
- "precreate-core scholarspace_test /opt/solr/server/configsets/hyraxconf; solr-precreate scholarspace_prod /opt/solr/server/configsets/hyraxconf"
volumes:
- solr_home:/var/solr/data:cached
- ./solr/conf:/opt/solr/server/configsets/hyraxconf
- ./solr/plugins:/opt/solr/lib
ulimits:
nofile:
soft: 65536
hard: 524288
ports:
- 8983
networks:
- scholarspace
healthcheck:
test:
[
"CMD-SHELL",
"wget --no-verbose --spider --tries=1 localhost:8983 || exit 1",
]
interval: 30s
timeout: 5s
retries: 20
volumes:
prod-db:
prod-storage:
prod-derivatives:
prod-uploads:
prod-public:
prod-tmp:
redis:
fedora:
sidekiq-public:
sidekiq-tmp:
solr_home:
networks:
scholarspace:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-scholarspace