-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
184 lines (176 loc) · 4.6 KB
/
Copy pathdocker-compose.yml
File metadata and controls
184 lines (176 loc) · 4.6 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
services:
photo-api:
build:
context: .
dockerfile: Dockerfile
network: host
args:
SERVICE_NAME: photo
SERVICE_PORT: "8080"
ports:
- "8080:8080"
environment:
SERVICE_NAME: photo
SERVICE_PORT: "8080"
OTEL_EXPORTER_OTLP_ENDPOINT: otel-collector:4317
OTEL_TRACES_ENABLED: "true"
OTEL_METRICS_ENABLED: "true"
OTEL_LOGS_ENABLED: "true"
EMULATED_STORAGE_URL: http://localhost:10000
BLOB_EMULATOR_URL: http://blobemu:10000
depends_on:
- otel-collector
- blobemu
resize-api:
build:
context: .
dockerfile: Dockerfile
network: host
args:
SERVICE_NAME: resize
SERVICE_PORT: "8081"
environment:
SERVICE_NAME: resize
SERVICE_PORT: "8081"
OTEL_EXPORTER_OTLP_ENDPOINT: otel-collector:4317
OTEL_TRACES_ENABLED: "true"
OTEL_METRICS_ENABLED: "true"
OTEL_LOGS_ENABLED: "true"
STORAGE_ACCOUNT_NAME: blobemu
STORAGE_ACCOUNT_SUFFIX: "localhost:10000"
BLOB_EMULATOR_URL: http://blobemu:10000
EMULATED_STORAGE_URL: http://blobemu:10000
IMAGES_CONTAINER_NAME: images
MAX_IMAGE_HEIGHT: "1200"
MAX_IMAGE_WIDTH: "1600"
UPLOADS_QUEUE_BINDING: queue-uploads
network_mode: "service:resize-dapr"
depends_on:
rabbitmq:
condition: service_healthy
blobemu:
condition: service_started
otel-collector:
condition: service_started
resize-dapr:
image: "daprio/daprd:latest"
command:
[
"./daprd",
"--app-id", "resize-api",
"--app-port", "8081",
"--app-protocol", "grpc",
"--dapr-grpc-port", "50001",
"--dapr-http-port", "3500",
"--resources-path", "/components",
"--log-level", "info",
]
volumes:
- ./dapr/components:/components
ports:
- "8081:8081" # app port (shared network)
- "3500:3500" # Dapr HTTP
- "50001:50001" # Dapr gRPC
depends_on:
rabbitmq:
condition: service_healthy
blobemu:
build:
context: ./blobemu
dockerfile: Dockerfile
network: host
ports:
- "10000:10000"
environment:
RABBITMQ_URL: amqp://guest:guest@rabbitmq:5672/
RABBITMQ_EXCHANGE: blob-events
RABBITMQ_ROUTING_KEY: blob.created
RABBITMQ_QUEUE: blob-events
RABBITMQ_FACE_EXCHANGE: face-events
RABBITMQ_FACE_QUEUE: face-events
RABBITMQ_FACE_ROUTING_KEY: blob.created
FACE_PUBLISH_CONTAINER: images
BLOB_PUBLIC_URL: http://blobemu:10000
volumes:
- ./data:/data
depends_on:
rabbitmq:
condition: service_healthy
face-api:
build:
context: .
dockerfile: Dockerfile-face-detection
network: host
args:
SERVICE_NAME: face
SERVICE_PORT: "8082"
environment:
SERVICE_NAME: face
SERVICE_PORT: "8082"
IMAGES_QUEUE_BINDING: queue-images
FACE_STORE_TYPE: sqlite
FACE_STORE_DB: /data/facestore.db
EMULATED_STORAGE_URL: http://blobemu:10000
CASCADE_PATH: cascade/facefinder
PUPLOC_PATH: cascade/puploc
FLP_DIR: cascade/lps
network_mode: "service:face-dapr"
volumes:
- ./data:/data
depends_on:
rabbitmq:
condition: service_healthy
blobemu:
condition: service_started
face-dapr:
image: "daprio/daprd:latest"
command:
[
"./daprd",
"--app-id", "face-api",
"--app-port", "8082",
"--app-protocol", "grpc",
"--dapr-grpc-port", "50002",
"--dapr-http-port", "3501",
"--resources-path", "/components",
"--log-level", "info",
]
volumes:
- ./dapr/components:/components
ports:
- "8082:8082"
- "3501:3501"
- "50002:50002"
depends_on:
rabbitmq:
condition: service_healthy
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- "5672:5672" # AMQP
- "15672:15672" # Management UI
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- rabbitmq-data:/var/lib/rabbitmq
otel-collector:
image: grafana/otel-lgtm:latest
ports:
- "3000:3000" # Grafana UI
- "4317:4317" # OTLP gRPC
- "4318:4318" # OTLP HTTP
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- grafana-data:/var/lib/grafana
volumes:
blobemu-data:
rabbitmq-data:
grafana-data: