-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (69 loc) · 1.53 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
services:
api:
env_file:
- .env.docker
environment:
- ENV=docker
build:
context: .
dockerfile: Dockerfile.api
ports:
- "8000:8000"
volumes:
- .:/app
- ./images:/code/images
depends_on:
redis-service:
condition: service_started
mongodb-service:
condition: service_started
workers:
cpu_count: 8
mem_limit: 8g
mem_reservation: 8g
scale: 1
env_file:
- .env.docker
environment:
- ENV=docker
build:
context: .
dockerfile: Dockerfile.workers
args:
- ENV:${ENV:-docker}
volumes:
- .:/app
- ./images:/code/images
depends_on:
redis-service:
condition: service_started
mongodb-service:
condition: service_started
command:
celery -A ai_platform.task_queue.main worker --queues default --pool solo --concurrency 1 --loglevel DEBUG --without-gossip
develop:
watch:
- action: sync
path: ./ai_platform
target: /app/ai_platform
mongodb-service:
image: mongo:latest
restart: always
env_file:
- .env.docker
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
redis-service:
image: redis:latest
ports:
- "6379:6379"
flower-service:
image: mher/flower:0.9.7
command: [ 'flower', '--broker=redis://redis-service:6379/0', '--port=5555' ]
ports:
- 5557:5555
depends_on:
- redis-service