-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
82 lines (76 loc) · 2.14 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
version: '2'
services:
web:
build: .
image: document_insight_system_image
restart: always
ports:
- "${WEB_PORT:-8080}:8080"
depends_on:
- mongodb
- worker
env_file:
- .env
environment:
- PYTHONUNBUFFERED=1
- PYTHONIOENCODING=UTF-8
- CELERY_BROKER_URL=${REDIS_URL}
- CELERY_RESULT_BACKEND=${REDIS_URL}
volumes:
- presentation_files:/usr/src/project/files/
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
cpuset: ${CONTAINER_CPU:-0-1}
worker:
image: document_insight_system_image
restart: always
command: celery --app=app.tasks.celery worker -n celery@worker --beat -Q ${CELERY_QUERIES} --loglevel=info
environment:
- CELERY_BROKER_URL=${REDIS_URL}
- CELERY_RESULT_BACKEND=${REDIS_URL}
depends_on:
- redis
- mongodb
volumes:
- presentation_files:/usr/src/project/files/
- language_tool_cache:/root/.cache/language_tool_python/
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
cpuset: ${CONTAINER_CPU:-0-1}
mem_limit: ${WORKER_MEMORY:-1G}
worker-dashboard:
image: document_insight_system_image
command: celery --broker=${REDIS_URL} flower --port=${FLOWER_PORT} --url_prefix=${FLOWER_PREFIX} --basic_auth=${FLOWER_AUTH} --persistent=True
ports:
- "${FLOWER_PORT}:5555"
environment:
- SECRET_KEY=${FLOWER_SECRET_KEY}
- CELERY_BROKER=${REDIS_URL}
- CELERY_BACKEND=${REDIS_URL}
volumes:
- flower_data:/etc/db/
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
depends_on:
- worker
- redis
cpuset: ${CONTAINER_CPU:-0-1}
redis:
image: redis:6-alpine
restart: always
volumes:
- redis_data:/data
cpuset: ${CONTAINER_CPU:-0-1}
mongodb:
image: mongo:4.0.17-xenial
restart: always
command:
- '--wiredTigerCacheSizeGB=${MONGODB_CACHE_SIZE:-1}'
volumes:
- ../slides_checker_mongo_data:/data/db
cpuset: ${CONTAINER_CPU:-0-1}
volumes:
flower_data:
language_tool_cache:
presentation_files:
redis_data: