forked from internetarchive/openlibrary
-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yaml
104 lines (98 loc) · 2.83 KB
/
compose.yaml
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
services:
web:
image: "${OLIMAGE:-oldev:latest}"
environment:
- OL_CONFIG=${OL_CONFIG:-/openlibrary/conf/openlibrary.yml}
- GUNICORN_OPTS=${GUNICORN_OPTS:- --reload --workers 4 --timeout 180}
- OL_COVERSTORE_PUBLIC_URL=${OL_COVERSTORE_PUBLIC_URL:-}
command: docker/ol-web-start.sh
ports:
- ${WEB_PORT:-8080}:8080
networks:
- webnet
- dbnet
logging:
options:
max-size: "512m"
max-file: "4"
solr:
image: solr:9.5.0
expose:
- 8983
environment:
# Soft commit frequently to make sure changes are visible in search
# Hard commit less frequently to avoid performance impact, but avoid
# having very large transaction log
# https://solr.apache.org/guide/solr/latest/configuration-guide/commits-transaction-logs.html
# Enlarge the max boolean clauses so that we can large intersections
# between books in reading logs and solr.
# Should be in sync with the value in openlibrary/core/bookshelves.py ,
# eg key:(/works/OL1W OR /works/OL2W OR ...)
- SOLR_OPTS=
-Dsolr.autoSoftCommit.maxTime=60000
-Dsolr.autoCommit.maxTime=120000
-Dsolr.max.booleanClauses=30000
volumes:
- solr-data:/var/solr
- ./conf/solr:/opt/solr/server/solr/configsets/olconfig:ro
networks:
- webnet
logging:
options:
max-size: "512m"
max-file: "4"
# Create (or use if already existing) a core called "openlibrary" with our config & schema
command: solr-precreate openlibrary /opt/solr/server/solr/configsets/olconfig
solr-updater:
image: "${OLIMAGE:-oldev:latest}"
command: docker/ol-solr-updater-start.sh
hostname: "${HOSTNAME:-$HOST}"
environment:
- OL_CONFIG=conf/openlibrary.yml
- OL_URL=http://web:8080/
- STATE_FILE=solr-update.offset
volumes:
- solr-updater-data:/solr-updater-data
networks:
- webnet
- dbnet
memcached:
image: memcached
networks:
- webnet
covers:
image: "${OLIMAGE:-oldev:latest}"
environment:
- COVERSTORE_CONFIG=${COVERSTORE_CONFIG:-/openlibrary/conf/coverstore.yml}
- GUNICORN_OPTS=${GUNICORN_OPTS:- --reload --workers 1 --max-requests 250}
command: docker/ol-covers-start.sh
expose:
- 7075
networks:
- webnet
- dbnet
logging:
options:
max-size: "512m"
max-file: "4"
infobase:
image: "${OLIMAGE:-oldev:latest}"
environment:
- INFOBASE_CONFIG=${INFOBASE_CONFIG:-/openlibrary/conf/infobase.yml}
- INFOBASE_OPTS=${INFOBASE_OPTS:-}
command: docker/ol-infobase-start.sh
expose:
- 7000
networks:
- webnet
- dbnet
logging:
options:
max-size: "512m"
max-file: "4"
networks:
webnet:
dbnet:
volumes:
solr-data:
solr-updater-data: