forked from internetarchive/openlibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
97 lines (91 loc) · 2.66 KB
/
docker-compose.production.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
##
## Production server config (wip)
## You probably want to run:
## docker-compose -f docker-compose.yml -f docker-compose.infogami-local.yml -f docker-compose.production.yml up -d
##
version: "3.1"
services:
web:
restart: always
hostname: "$HOSTNAME"
environment:
- GUNICORN_OPTS= --workers 50 --timeout 300 --max-requests 500
- OL_CONFIG=/olsystem/etc/openlibrary.yml
- PYENV_VERSION=3.8.6
- BEFORE_START=pip install -e /booklending_utils
volumes:
- ../booklending_utils:/booklending_utils
- ../olsystem:/olsystem
- ../olsystem/etc/ia.ini:/home/openlibrary/.config/ia.ini
covers:
restart: always
hostname: "$HOSTNAME"
environment:
- GUNICORN_OPTS= --workers 30 --max-requests 500
- COVERSTORE_CONFIG=/olsystem/etc/coverstore.yml
- PYENV_VERSION=3.8.6
volumes:
- ../olsystem:/olsystem
- /1:/1
covers_nginx:
image: nginx:1.19.4
restart: always
depends_on:
- covers
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/covers_nginx.conf:/etc/nginx/sites-enabled/covers_nginx.conf:ro
# Needed for HTTPS, since this is a public server
- ../olsystem/etc/nginx/sites-available/default-docker.conf:/etc/nginx/sites-enabled/default:ro
# Needs access to openlibrary for static files
- .:/openlibrary
- ../olsystem:/olsystem
- /1/var/lib/openlibrary/sitemaps/sitemaps:/sitemaps
ports:
- 80:80
- 443:443
networks:
- webnet
secrets:
- petabox_seed
# Needed by default-docker.conf
- ssl_certificate
- ssl_certificate_key
infobase:
restart: always
hostname: "$HOSTNAME"
environment:
- INFOBASE_OPTS= fastcgi
- INFOBASE_CONFIG=/olsystem/etc/infobase.yml
- PYENV_VERSION=3.8.6
volumes:
- ../olsystem:/olsystem
- infobase-writelog:/1/var/lib/openlibrary/infobase/log
- infobase-errorlog:/1/var/log/openlibrary/infobase-errors
infobase_nginx:
image: nginx:1.19.4
restart: always
depends_on:
- infobase
volumes:
- ./docker/nginx.conf:/etc/nginx/nginx.conf:ro
- ./docker/infobase_nginx.conf:/etc/nginx/sites-enabled/infobase_nginx.conf:ro
# Needs olsystem for black-listed IPs
- ../olsystem:/olsystem
ports:
- 7000:7000
networks:
- webnet
secrets:
- petabox_seed
secrets:
petabox_seed:
file: /opt/.petabox/seed
# SSL-related secrets
ssl_certificate:
file: /opt/.petabox/openlibrary.org.combined.crt
ssl_certificate_key:
file: /opt/.petabox/openlibrary.org.nopassword.key
volumes:
infobase-writelog:
infobase-errorlog: