forked from Donskoy-Andrey/animals-hack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
122 lines (116 loc) · 2.88 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
services:
backend:
container_name: backend
build:
dockerfile: docker/backend/Dockerfile
context: .
ports:
- "8001:8001"
- "8081:8081"
command: python3 /app/web
restart: on-failure
env_file:
- ./animals/backend/web/config/.env
volumes:
# - ./duplicates/backend/__init__.py:/app/duplicates/__init__.py
- ./animals/backend:/app/
- ./data/:/data
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
healthcheck:
test: curl --fail http://0.0.0.0:8001/api/tech/liveness || exit 1
interval: 1s
timeout: 1s
retries: 10
rabbitmq:
container_name: rabbitmq
image: rabbitmq:3.13-management
healthcheck:
test: rabbitmq-diagnostics -q ping
# test: curl --fail http://0.0.0.0:15672 || exit 1
interval: 30s
timeout: 10s
retries: 20
ports:
- '5672:5672'
- '15672:15672'
db:
container_name: db
image: postgres:latest
ports:
- "5432:5432"
command: [ "postgres", "-c", "log_statement=all", "-c", "log_destination=stderr" ]
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres", "-d", "postgres" ]
interval: 1s
retries: 20
environment:
POSTGRES_DB: "postgres"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
consumer:
container_name: consumer
build:
dockerfile: docker/backend/Dockerfile
context: .
command: python3 /app/consumer
restart: on-failure
env_file:
- ./animals/backend/consumer/config/.env
volumes:
- ./animals/backend:/app/
- ./data/:/data
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
backend:
condition: service_healthy
frontend:
container_name: frontend
build:
context: .
dockerfile: docker/frontend/Dockerfile
volumes:
- ./animals/frontend/src:/app/src
- ./animals/frontend/public:/app/public
command: >
/bin/sh -c "npm start"
webserver:
container_name: nginx
build:
context: .
dockerfile: docker/webserver/Dockerfile
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_started
triton:
container_name: triton
build:
context: .
dockerfile: docker/triton/Dockerfile
# deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: 1
# capabilities: [ gpu ]
volumes:
- ./animals/triton/models:/models
# environment:
# - NVIDIA_VISIBLE_DEVICES=all
command: >
/bin/sh -c "tritonserver --http-port=8002 --metrics-port=8003 --grpc-port=8004 --model-repository=/models"
ports:
- 8002:8002
- 8003:8003
- 8004:8004