-
Notifications
You must be signed in to change notification settings - Fork 71
/
docker-compose.yml
159 lines (153 loc) · 4.28 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
148
149
150
151
152
153
154
155
156
157
158
159
services:
#
# Perma
#
# TO USE REDIS FOR CACHING:
# Add the caches setting found in settings_prod to your settings.py,
# with "LOCATION": "redis://perma-redis:6379/0"
# (Don't clobber the Celery backend, which is at /1)
perma-redis:
image: registry.lil.tools/library/redis:4.0.6
volumes:
- redis_data:/data:delegated
db:
image: registry.lil.tools/library/postgres:12.11
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: perma
POSTGRES_USER: perma
volumes:
- postgres_data:/var/lib/postgresql/data:delegated
networks:
- default
- superset
web:
image: registry.lil.tools/harvardlil/perma-web:128-66ca6d620a12658fe002d23bfe01ff37
tty: true
command: bash
# TO AUTOMATICALLY START PERMA:
# (sleep hack to give the database and rabbitmq time to start up)
# command: >
# sh -c "sleep 10 && ./manage.py migrate && invoke run"
volumes:
# NAMED VOLUMES
- scoop_access_key:/tmp/scoop_access_key:ro
# Use a named, persistent volume so that the node_modules directory,
# which is created during the image's build process, and which our
# code presently expects to be nested inside the perma_web directory,
# isn't wiped out when mounting our code in ./perma_web code to
# the container. We can consider restructuring the project instead.
- node_modules:/perma/perma_web/node_modules
# BIND MOUNTS
- ./perma_web:/perma/perma_web
- ./services/celery:/perma/services/celery
- ./services/cloudflare:/perma/services/cloudflare
- ./services/django:/perma/services/django:delegated
- ./services/logs:/perma/services/logs:delegated
# for playwright tests
- ./services/docker/minio/ssl:/tmp/minio_ssl
- ./services/docker/wacz-exhibitor/ssl:/tmp/wacz-exhibitor_ssl
# give chrome lots of space for making big screenshots
# https://github.com/elgalu/docker-selenium/issues/20
shm_size: 2G
environment:
- DJANGO_LIVE_TEST_SERVER_ADDRESS=0.0.0.0:8000
extra_hosts:
- "perma.test:127.0.0.1"
- "api.perma.test:127.0.0.1"
ports:
- "127.0.0.1:8000:8000"
depends_on:
- db
networks:
default:
aliases:
- 'perma.test'
- 'api.perma.test'
perma_payments:
scoop_rest_api:
aliases:
- 'perma.test'
#
# Minio
#
minio:
image: minio/minio:RELEASE.2022-05-03T20-36-08Z
entrypoint:
- "/entrypoint.sh"
command:
- "server"
- "--address"
- ":9000"
- "--console-address"
- ":9001"
- " --certs-dir"
- "/ssl"
- "/data"
environment:
- MINIO_SERVER_URL=https://perma.minio.test:9000
# synonym for old MINIO_ACCESS_KEY
- MINIO_ROOT_USER=accesskey
# synonym for old MINIO_SECRET_KEY
- MINIO_ROOT_PASSWORD=secretkey
- DATA_DIR=/data
- BUCKET=perma-storage
- SECONDARY_BUCKET=perma-secondary-storage
- MINIO_API_CORS_ALLOW_ORIGIN=https://replay.perma.test:8000
volumes:
- ./services/docker/minio/entrypoint.sh:/entrypoint.sh
- ./services/docker/minio/ssl:/ssl
- minio_data:/data:delegated
ports:
- "127.0.0.1:9000:9000"
- "127.0.0.1:9001:9001"
extra_hosts:
- "perma.minio.test:127.0.0.1"
networks:
default:
aliases:
- 'perma.minio.test'
#
# wacz-exhibitor
#
wacz-exhibitor:
image: registry.lil.tools/harvardlil/wacz-exhibitor:5-14853706630a07e835ebb9da840ece83
ports:
- "127.0.0.1:8080:8080"
extra_hosts:
- "rejouer.perma.test:127.0.0.1"
networks:
default:
aliases:
- 'rejouer.perma.test'
volumes:
- ./services/docker/wacz-exhibitor/ssl:/etc/nginx/certs
#
# Upload scanning
#
filecheck:
image: registry.lil.tools/harvardlil/perma-filecheck:0.105
environment:
- UVICORN_PORT=8888
ports:
- "127.0.0.1:8888:8888"
networks:
- default
volumes:
node_modules:
postgres_data:
redis_data:
pp_db_data:
scoop_redis_data:
scoop_postgres_data:
scoop_access_key:
minio_data:
superset_data:
networks:
default:
perma_payments:
name: perma-payments_default
scoop_rest_api:
name: perma-scoop-api_default
scoop_rest_api_internal:
superset: