-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
53 lines (52 loc) · 1.32 KB
/
docker-compose.yaml
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
version: '3'
services:
ai-server:
build: ./ai-server
restart: unless-stopped
volumes:
- ./ai-server:/app
ports:
- 5000:5000
command: python3 run.py
depends_on:
- db
- celery-ai
# learner-server:
# build: ./learner-server
# restart: unless-stopped
# volumes:
# - ./learner-server:/app
# - ./ai-data:/data
# environment:
# - IS_DOCKER=1
# - DOCKER=0
# ports:
# - 5010:5010
# depends_on:
# - db
celery-ai:
build:
context: "./ai-server"
command: celery -A celery_worker worker --autoscale=10,4 --loglevel=info
volumes:
- ./ai-server:/app
- ./ai-data:/data
depends_on:
- redis
restart: unless-stopped
redis:
image: "redis:alpine"
hostname: redis
ports:
- "6379:6379"
db:
image: postgres
command: postgres -c 'max_connections=500'
volumes:
- ./data/db:/var/lib/postgresql/data
ports:
- "5433:5432"
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres_user
- POSTGRES_PASSWORD=postgres_pass