-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.04 KB
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.04 KB
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
services:
mongodb:
image: mongo:6.0
container_name: sefaria-mongodb
ports:
- "27017:27017"
volumes:
- mongodb_data:/data/db
# Constrain MongoDB memory to prevent OOM kills
command: ["mongod", "--wiredTigerCacheSizeGB", "2.5"]
deploy:
resources:
limits:
memory: 6g
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.runCommand({ ping: 1 })"]
interval: 10s
timeout: 5s
retries: 20
exporter:
build:
context: .
dockerfile: Dockerfile
container_name: sefaria-exporter
depends_on:
mongodb:
condition: service_healthy
environment:
- TZ=Asia/Jerusalem
- DJANGO_SETTINGS_MODULE=sefaria.settings
- MONGO_HOST=mongodb
- MONGO_PORT=27017
- MONGO_DB_NAME=sefaria
- SEFARIA_EXPORT_PATH=/app/exports
- TS_STAMP=${TS_STAMP:-}
volumes:
- ./exports:/app/exports
- ./output:/app/output
# Increase shared memory for MongoDB operations
shm_size: 2gb
volumes:
mongodb_data: