-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
101 lines (96 loc) · 2.09 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
version: "3"
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- 3000:3000
restart: always
environment:
DB_HOST: db
DB_PORT: 5432
DB_USER: postgres
DB_NAME: postgres
DB_PASSWORD: postgres
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
RABBIT_QUEUE_PRODUCER: classify
RABBIT_QUEUE_CONSUMER: result
RABBIT_USER: guest
RABBIT_PASS: guest
SIGNING_SECRET: "d+l1r+99+zjHXVRPZxKcy9p+BbM45fPJXJqPlXZ8C3w="
LOCAL_ENV_PATH: ".env.docker-compose"
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
rabbit:
condition: service_healthy
links:
- db
- rabbit
- redis
ai:
build:
context: ./ai
dockerfile: Dockerfile
environment:
DB_HOST: db
DB_PORT: 5432
DB_USER: postgres
DB_NAME: postgres
DB_PASS: postgres
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
RABBIT_QUEUE_CONSUMER: classify
RABBIT_QUEUE_PRODUCER: result
RABBIT_USER: guest
RABBIT_PASS: guest
PRODUCTION: 0
MODEL_URL: "#"
ML_MODEL: "./paddy30.pth"
MAX_ML_WORKERS: 5
restart: always
depends_on:
db:
condition: service_healthy
rabbit:
condition: service_healthy
links:
- db
- rabbit
cpuset: "0-1"
redis:
build:
context: ./backend/cache
dockerfile: Dockerfile
restart: always
healthcheck:
test: ["CMD-SHELL", "redis-cli ping"]
interval: 10s
timeout: 5s
retries: 5
rabbit:
image: rabbitmq:3.11.26-management
restart: always
healthcheck:
test: ["CMD-SHELL", "rabbitmqctl status"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 15672:15672
db:
image: postgres:15.5-bullseye
restart: always
environment:
POSTGRES_USER: postgres
PGUSER: postgres
POSTGRES_PASSWORD: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5