-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (50 loc) · 1.69 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
version: '3.8'
services:
redis:
image: redis:7.2-alpine
rabbitmq:
image: rabbitmq:3.13-rc-management
db:
image: mysql:8.2-oracle
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=dev
web:
build: .
environment:
- ENVIRONMENT=dev
- TESTING=0
- SECRET_KEY=697be90749590b29ad92e0f8b5a0e7d11cf895403af9858ba7813bd51aac5795
- DATABASE_URL=mysql+asyncmy://root@db/dev
- DATABASE_TEST_URL=sqlite+aiosqlite://
- BROKER_URL=amqp://rabbitmq
- RESULT_BACKEND=redis://redis
- SUMMARIZER_MODEL_RU=IlyaGusev/mbart_ru_sum_gazeta
- SUMMARIZER_MODEL_EN=facebook/bart-large-cnn
- LANGUAGE_DETECTION_MODEL=papluca/xlm-roberta-base-language-detection
volumes:
- .:/home/app
ports:
- "8000:8000"
depends_on:
- redis
- rabbitmq
command: ./scripts/wait-for-it.sh -t 30 db:3306 -- gunicorn -b 0.0.0.0 -k uvicorn.workers.UvicornWorker app.main:app
worker:
build: .
environment:
- ENVIRONMENT=dev
- TESTING=0
- SECRET_KEY=697be90749590b29ad92e0f8b5a0e7d11cf895403af9858ba7813bd51aac5795
- DATABASE_URL=mysql+asyncmy://root@db/dev
- DATABASE_TEST_URL=sqlite+aiosqlite://
- BROKER_URL=amqp://rabbitmq
- RESULT_BACKEND=redis://redis
- SUMMARIZER_MODEL_RU=IlyaGusev/mbart_ru_sum_gazeta
- SUMMARIZER_MODEL_EN=facebook/bart-large-cnn
- LANGUAGE_DETECTION_MODEL=papluca/xlm-roberta-base-language-detection
volumes:
- .:/home/app
depends_on:
- web
command: ./scripts/wait-for-it.sh -t 10 rabbitmq:5672 -- celery -A app.background.worker worker --without-heartbeat --without-gossip --without-mingle -l INFO