-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
134 lines (124 loc) · 2.88 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
volumes:
postgres:
solr:
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
- postgres
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
command: bundle exec rake solid_queue:start
webpacker:
<<: *app
environment:
- NODE_ENV=development
- WEBPACKER_DEV_SERVER_HOST=127.0.0.1
command: ./bin/webpack-dev-server
ports:
- 127.0.0.1:3035:3035
profiles:
- develop
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
cantaloupe:
image: islandora/cantaloupe:3
expose:
- 8182
restart: always
environment:
- CANTALOUPE_HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_PREFIX=http://web:3000/picture_files/
- CANTALOUPE_HTTPSOURCE_BASICLOOKUPSTRATEGY_URL_SUFFIX=/download
- CANTALOUPE_ENDPOINT_API_ENABLED=true
networks:
internal:
healthcheck:
test: ["CMD-SHELL", "curl -f http://cantaloupe: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