-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·141 lines (132 loc) · 2.78 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
version: '3'
volumes:
db:
solr:
redis:
app:
file_uploads:
derivatives:
cache:
branding:
networks:
internal:
services:
solr:
image: solr:8
env_file:
- .env
environment:
- OOM=script
command:
- sh
- "-c"
- "precreate-core ${SOLR_TEST_CORE} /opt/solr/solr_conf; solr-precreate ${SOLR_CORE} /opt/solr/solr_conf"
networks:
internal:
expose:
- 8983
ports:
- 8983:8983
volumes:
- solr:/var/solr
- ./hyrax/solr/conf:/opt/solr/solr_conf
healthcheck:
test: ["CMD-SHELL", "wget -O /dev/null http://localhost:8983/solr/"]
interval: 30s
timeout: 5s
retries: 3
appdb:
image: postgres:15-alpine
env_file:
- .env
environment:
- POSTGRES_DB=${POSTGRES_DB_APP}
networks:
internal:
expose:
- 5432
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "POSTGRES_PASSWORD=${POSTGRES_PASSWORD} pg_isready -U ${POSTGRES_USER} -h localhost -d ${POSTGRES_DB_APP}"]
interval: 30s
timeout: 5s
retries: 3
app: &app
build:
context: hyrax
args:
RAILS_ENV: ${RAILS_ENV}
UPLOADS_PATH: ${UPLOADS_PATH}
DERIVATIVES_PATH: ${DERIVATIVES_PATH}
CACHE_PATH: ${CACHE_PATH}
FITS_PATH: ${FITS_PATH}
FITS_VERSION: ${FITS_VERSION}
env_file:
- .env
networks:
internal:
web:
<<: *app
environment:
- VIRTUAL_HOST=or2024.docker
- VIRTUAL_PORT=3000
- RAILS_FORCE_SSL=false
command: bash -c "/bin/docker-entrypoint.sh"
depends_on:
- appdb
- solr
- redis
- fits
networks:
internal:
aliases:
- web
expose:
- 3000
ports:
- 3000:3000
volumes:
- file_uploads:${UPLOADS_PATH}
- derivatives:${DERIVATIVES_PATH}
- cache:${CACHE_PATH}
- branding:${BRAND_PATH}
- ${HOST_APP_DATA_PATH:-/data/}:/data/data
- ./hyrax:/data:cached
workers:
<<: *app
command: bash -c "bundle install && bundle exec sidekiq"
depends_on:
- appdb
- solr
- redis
- fits
volumes:
- file_uploads:${UPLOADS_PATH}
- derivatives:${DERIVATIVES_PATH}
- cache:${CACHE_PATH}
- branding:${BRAND_PATH}
- ${HOST_APP_DATA_PATH:-/data/}:/data/data
- ./hyrax:/data:cached
redis:
image: redis:6
command: redis-server --appendonly yes
networks:
internal:
expose:
- 6379
ports:
- 6379:6379
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 30s
timeout: 5s
retries: 3
volumes:
- redis:/data
fits:
image: ghcr.io/samvera/fitsservlet:1.6.0
ports:
- 8080
networks:
internal: