-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
98 lines (91 loc) · 2.1 KB
/
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
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
version: '3.8'
services:
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
hostname: rabbitmq
volumes:
- ./rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
- ./certs:/etc/rabbitmq/certs
- /var/lib/rabbitmq
ports:
- 15672:15672
- 5671:5671
env_file:
- .env
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "ping", "-q"]
interval: 5s
timeout: 2s
retries: 5
postgres:
image: postgres:latest
environment:
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data:rw
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 1s
retries: 3
redis:
image: redis:latest
ports:
- 6379:6379
volumes:
- redis_data:/data
command: redis-server --requirepass ${REDIS_PASSWORD}
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 1s
retries: 5
api-gateway-svc:
container_name: api-gateway-svc
image: api-gateway-svc
build:
context: ./api-gateway-svc
ports:
- 3000:3000
environment:
NODE_ENV: production
depends_on:
rabbitmq:
condition: service_healthy
auth-svc:
build:
context: ./auth-svc
environment:
NODE_ENV: production
depends_on:
postgres:
condition: service_healthy
rabbitmq:
condition: service_healthy
redis:
condition: service_healthy
grpc_cv_service:
container_name: grpc-cv-service
build:
context: ./grpc-vision-svc
target: final
volumes:
- /home/${USER}/.cache/huggingface/:/nonexistent/.cache/huggingface/ # Use cached models from host
ports:
- 50051:50051
environment:
- RUST_LOG=DEBUG
- VISION_ADDR=[::]:50051
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
volumes:
postgres_data:
redis_data: