-
Notifications
You must be signed in to change notification settings - Fork 25
/
docker-compose.yml
147 lines (136 loc) · 3.09 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
version: '3.8'
volumes:
postgres:
solr:
redis:
networks:
internal:
x-app: &app
env_file:
- .env
environment:
- no_proxy: localhost,web,workers,tika
build:
context: .
args:
- UID=${UID}
- GID=${GID}
- http_proxy=${http_proxy}
- https_proxy=${http_proxy}
image: ghcr.io/next-l/enju_leaf:latest
networks:
internal:
volumes:
- ./:/enju
depends_on:
- solr
- redis
restart: always
services:
web:
<<: *app
command: bash -c "rm -f tmp/pids/server.pid && bin/rails s -b 0.0.0.0"
environment:
- WEBPACKER_DEV_SERVER_HOST=webpacker
expose:
- 3000
workers:
<<: *app
environment:
- QUEUE=*
command: bundle exec rake resque:work
solr:
image: solr:8
expose:
- 8983
env_file:
- .env
networks:
internal:
volumes:
- solr:/var/solr/data
- ./solr:/mnt/solr
restart: always
command: bash -c "precreate-core enju_leaf_${RAILS_ENV} /mnt/solr/configsets/sunspot/conf/; precreate-core enju_leaf_test /mnt/solr/configsets/sunspot/conf/; exec solr -f"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8983/solr/enju_leaf_${RAILS_ENV}/admin/ping"]
interval: 30s
timeout: 5s
retries: 3
postgres:
image: postgres:13
volumes:
- postgres:/var/lib/postgresql/data
networks:
internal:
env_file:
- .env
expose:
- 5432
restart: always
healthcheck:
test: ["CMD-SHELL", "POSTGRES_PASSWORD=${POSTGRES_PASSWORD} pg_isready -U ${POSTGRES_USER} -h localhost -d template1"]
interval: 30s
timeout: 5s
retries: 3
redis:
image: redis:6
volumes:
- redis:/data
command: redis-server --appendonly yes
networks:
internal:
expose:
- 6379
restart: always
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 30s
timeout: 5s
retries: 3
cantaloupe:
image: uclalibrary/cantaloupe:5.0.6-4
expose:
- 8182
restart: always
environment:
no_proxy: localhost,web
SOURCE_STATIC: HttpSource
HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_PREFIX: http://web:3000/picture_files/
HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_SUFFIX: '.download?size=original'
ENDPOINT_API_ENABLED: 'true'
BASE_URI: ${CANTALOUPE_BASE_URI}
networks:
internal:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8182/health"]
interval: 30s
timeout: 20s
retries: 3
tika:
image: apache/tika:2.9.2.1
expose:
- 9998
restart: always
networks:
internal:
nginx:
image: nginx:stable
ports:
- ${ENJU_LEAF_BIND_ADDRESS}:8080:80
- ${ENJU_LEAF_BIND_ADDRESS}:8182:8182
volumes:
- ./nginx/templates:/etc/nginx/templates:ro
- ./nginx/certs:/etc/nginx/certs:ro
- ./public:/opt/enju_leaf/public
restart: always
networks:
internal:
depends_on:
- web
- cantaloupe
healthcheck:
test: ["CMD", "service", "nginx", "status"]
interval: 30s
timeout: 20s
retries: 3