-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.yml
215 lines (202 loc) · 5.62 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
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
203
204
205
206
207
208
209
210
211
212
213
214
215
version: '3.4'
volumes:
database:
fedora:
solr:
npms:
data:
networks:
internal:
external:
services:
db: &db-avalon
image: postgres:14-alpine
volumes:
- database:/data
environment:
- PGDATA=/data
- POSTGRES_USER=postgres
- POSTGRES_DB=avalon
- POSTGRES_PASSWORD=password
networks:
internal:
db-test:
<<: *db-avalon
volumes: []
fedora: &fedora
image: avalonmediasystem/fedora:4.7.5
depends_on:
- db
volumes:
- fedora:/data
environment:
- JAVA_OPTIONS=-Dfcrepo.modeshape.configuration=classpath:/config/file-simple/repository.json -Dfcrepo.home=/data
networks:
internal:
ulimits:
nofile:
soft: 65536
hard: 65536
fedora-test:
<<: *fedora
volumes: []
solr: &solr
image: solr:9
volumes:
- ./solr/conf:/opt/solr/avalon_conf
- solr:/var/solr
command:
- solr-precreate
- avalon
- /opt/solr/avalon_conf
networks:
internal:
solr-test:
<<: *solr
volumes:
- ./solr/conf:/opt/solr/avalon_conf
hls:
image: avalonmediasystem/nginx:minio-jammy
environment:
- AVALON_DOMAIN=http://avalon:3000
- AVALON_STREAMING_BUCKET_URL=http://minio:9000/derivatives/
volumes:
- ./log/nginx:/var/log/nginx
ports:
- '8880:80'
networks:
internal:
external:
redis: &redis
image: redis:alpine
networks:
internal:
redis-test:
<<: *redis
avalon: &avalon
image: avalonmediasystem/avalon:develop
build:
context: .
target: dev
command: bash -c "/docker_init.sh && bundle exec rails server -b 0.0.0.0"
depends_on:
- db
- fedora
- solr
- redis
- hls
- minio
environment:
- APP_NAME=avalon
- BUNDLE_FLAGS=--with development postgres --without production test
- ENCODE_WORK_DIR=/tmp
- CONTROLLED_VOCABULARY=config/controlled_vocabulary.yml
- DATABASE_URL=postgres://postgres:password@db/avalon
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
- FEDORA_NAMESPACE=avalon
- FEDORA_URL=http://fedoraAdmin:fedoraAdmin@fedora:8080/fedora/rest
- RAILS_ENV=development
- RAILS_ADDITIONAL_HOSTS=avalon
- SETTINGS__REDIS__HOST=redis
- SETTINGS__REDIS__PORT=6379
- SECRET_KEY_BASE=abcd
- SOLR_URL=http://solr:8983/solr/avalon
- AWS_REGION=us-east-1
- SETTINGS__ACTIVE_STORAGE__BUCKET=supplementalfiles
- SETTINGS__ACTIVE_STORAGE__SERVICE=generic_s3
- SETTINGS__FFMPEG__PATH=/usr/bin/ffmpeg
- SETTINGS__MINIO__ENDPOINT=http://minio:9000
- SETTINGS__MINIO__PUBLIC_HOST=http://localhost:9000
- SETTINGS__MINIO__ACCESS=minio
- SETTINGS__MINIO__SECRET=minio123
- SETTINGS__ENCODING__MASTERFILE_BUCKET=masterfiles
- SETTINGS__ENCODING__DERIVATIVE_BUCKET=derivatives
- SETTINGS__DROPBOX__PATH=s3://masterfiles/dropbox/
- SETTINGS__DROPBOX__UPLOAD_URI=s3://masterfiles/dropbox/
- SETTINGS__MASTER_FILE_MANAGEMENT__PATH=s3://preserves/
- SETTINGS__MASTER_FILE_MANAGEMENT__STRATEGY=move
- SETTINGS__STREAMING__CONTENT_PATH=/
- SETTINGS__STREAMING__STREAM_DEFAULT_QUALITY=medium
- SETTINGS__STREAMING__HTTP_BASE=http://localhost:8880/avalon
- SETTINGS__STREAMING__SERVER=nginx
- SETTINGS__STREAMING__STREAM_TOKEN_TTL=20
- SYSTEM_GROUPS=administrator,group_manager,manager
volumes:
- .:/home/app/avalon
- npms:/home/app/avalon/node_modules
ports:
- '3000:3000'
networks:
internal:
external:
stdin_open: true
tty: true
test:
<<: *avalon
command: >
bash -c "/docker_init.sh && tail -f /dev/null"
depends_on:
- db-test
- fedora-test
- solr-test
- redis-test
environment:
- DATABASE_URL=postgresql://postgres:password@db-test/avalon
- SETTINGS__FFMPEG__PATH=/usr/bin/ffmpeg
- SETTINGS__REDIS__HOST=redis-test
- SETTINGS__REDIS__PORT=6379
- FEDORA_URL=http://fedora-test:8080/fedora/rest
- SOLR_URL=http://solr-test:8983/solr/avalon
- RAILS_ENV=test
- BUNDLE_FLAGS=--with aws test postgres --without production
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL=true
ports: []
worker:
<<: *avalon
command: dumb-init -- bash -c "bundle install && bundle exec sidekiq -C config/sidekiq.yml"
ports: []
minio:
image: minio/minio:RELEASE.2024-01-29T03-56-32Z
command: minio server /data --console-address ":9090"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
volumes:
- data:/data
ports:
- 9000:9000
- 9090:9090
networks:
internal:
external:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 30s
timeout: 20s
retries: 3
createbuckets:
image: minio/mc
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 minio minio123;
/usr/bin/mc mb -p myminio/fcrepo myminio/masterfiles myminio/derivatives myminio/supplementalfiles myminio/preserves;
/usr/bin/mc anonymous set download myminio/derivatives;
/usr/bin/mc anonymous set download myminio/supplementalfiles;
exit 0;
"
networks:
internal:
cypress:
network_mode: host
image: cypress/included:latest
depends_on:
- avalon
entrypoint: cypress run -C spec/cypress/cypress.config.js
working_dir: /e2e
volumes:
- ./:/e2e
- npms:/e2e/node_modules
environment:
- CYPRESS_ENV=${CYPRESS_ENV:-local}