-
Notifications
You must be signed in to change notification settings - Fork 73
/
Copy pathdocker-compose.yml
132 lines (126 loc) · 3.56 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
version: '2'
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.8
environment:
POSTGRES_PASSWORD: password
POSTGRES_DB: perma
POSTGRES_USER: perma
volumes:
- postgres_data:/var/lib/postgresql/data:delegated
networks:
- default
web:
image: registry.lil.tools/harvardlil/perma-web:26-cb7a270eedc83fc304e684cfdbba0cbe
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 && fab run"
volumes:
# NAMED VOLUMES
# 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
- ./services/docker/minio/ssl:/tmp/minio_ssl
# give chrome lots of space for making big screenshots
# https://github.com/elgalu/docker-selenium/issues/20
shm_size: 2G
environment:
- DOCKERIZED=True
- 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"
- "replay.perma.test:127.0.0.1"
ports:
- "127.0.0.1:8000:8000"
depends_on:
- db
networks:
default:
aliases:
- 'perma.test'
- 'api.perma.test'
- 'replay.perma.test'
perma_payments:
#
# 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
- 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'
#
# Upload scanning
#
filecheck:
image: registry.lil.tools/harvardlil/perma-filecheck:0.92
environment:
- UVICORN_PORT=8888
ports:
- "127.0.0.1:8888:8888"
networks:
- default
volumes:
node_modules:
postgres_data:
redis_data:
pp_db_data:
minio_data:
networks:
default:
perma_payments:
name: perma-payments_default