-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
210 lines (192 loc) · 9.46 KB
/
docker-compose.yml
File metadata and controls
210 lines (192 loc) · 9.46 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# =============================================================================
# SmartHaus — Docker Compose
# =============================================================================
#
# Single compose file with profiles for different use cases.
#
# ── Local Development (default) ──────────────────────────────────────────────
# Starts infrastructure services only. The application runs from Visual
# Studio / dotnet run, with appsettings.Development.json pointing here.
#
# docker compose up
#
# ── Visitor Demo ─────────────────────────────────────────────────────────────
# Self-contained demo. Builds the app from source and launches the EdgeHardware
# feature — monitors CPU temperature and GPU telemetry with no external hardware
# dependencies. Ollama provides local LLM inference with GPU support.
#
# docker compose --profile demo up --build
#
# After startup, wait for the Ollama model pull to finish:
# docker compose --profile demo logs ollama-init -f
#
# Then send test events using ubiquiti-demo.http or curl:
# curl -X POST "http://localhost:8080/api/v1.0/ubiquiti/event/smart?type=person&camera_name=FrontDoor&score=0.95"
#
# Or query the EdgeHardware snapshot:
# curl http://localhost:8080/api/v1.0/edgehardware
#
# Service endpoints:
# Redis : localhost:6379
# P3x Redis UI : http://localhost:7843
# OTEL Collector : localhost:4317 (gRPC) / 4318 (HTTP)
# Azurite : localhost:10000 (Blob) / 10001 (Queue) / 10002 (Table)
# Ollama : http://localhost:11434 [demo profile]
# signal-cli REST : http://localhost:8081 [demo profile]
# SmartHaus API : http://localhost:8080/swagger [demo profile]
# =============================================================================
# =============================================================================
# Services
# =============================================================================
services:
# ---------- Infrastructure (always started) ----------
redis:
image: redis
command: [ "redis-server", "/usr/local/etc/redis/redis.conf" ]
ports:
- 6379:6379
volumes:
- ./.docker/redis.conf:/usr/local/etc/redis/redis.conf
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 3s
retries: 10
p3x:
image: patrikx3/p3x-redis-ui
ports:
- 7843:7843
volumes:
- ./.docker/p3x.json:/settings/.p3xrs-redis-ui.json
depends_on:
- redis
otelcol:
image: otel/opentelemetry-collector
ports:
- 4317:4317
- 4318:4318
volumes:
- ./.docker/otelcol.yaml:/etc/otelcol/config.yaml
azurite:
image: mcr.microsoft.com/azure-storage/azurite
command: azurite --skipApiVersionCheck --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0
ports:
- 10000:10000
- 10001:10001
- 10002:10002
volumes:
- azurite_data:/data
# ---------- Demo profile: Ollama ----------
ollama:
profiles: [ demo ]
image: ollama/ollama:latest
ports:
- 11434:11434
volumes:
- ollama_data:/root/.ollama
environment:
OLLAMA_NUM_PARALLEL: 1
OLLAMA_MAX_LOADED_MODELS: 1
# GPU support — requires NVIDIA Container Toolkit on the host.
# To run on CPU only, remove or comment out the deploy block.
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [ gpu ]
healthcheck:
test: [ "CMD-SHELL", "curl -sf http://localhost:11434 || exit 1" ]
interval: 5s
timeout: 3s
retries: 30
start_period: 10s
# One-shot service that pulls the Ollama model after the server is healthy.
# Monitor progress: docker compose --profile demo logs ollama-init -f
ollama-init:
profiles: [ demo ]
image: ollama/ollama:latest
depends_on:
ollama:
condition: service_healthy
environment:
OLLAMA_HOST: http://ollama:11434
entrypoint: [ "sh", "-c", "ollama pull qwen3.5:4b" ]
restart: "no"
# ---------- Demo profile: signal-cli ----------
# signal-cli REST API — enables Signal messaging with the Comms feature.
# Register a phone number via the API after startup:
# POST http://localhost:8081/v1/register/<number>
# or link an existing device via QR code:
# GET http://localhost:8081/v1/qrcodelink?device_name=haus-demo
signalcli:
profiles: [ demo ]
image: bbernhard/signal-cli-rest-api:latest
ports:
- 8081:8080
environment:
MODE: json-rpc
volumes:
- signalcli_data:/home/.local/share/signal-cli
healthcheck:
test: [ "CMD-SHELL", "curl -sf http://localhost:8080/v1/health || exit 1" ]
interval: 10s
timeout: 5s
retries: 10
start_period: 15s
# ---------- Demo profile: SmartHaus (EdgeHardware + Comms) ----------
smarthaus:
profiles: [ demo ]
build:
context: .
args:
CONFIGURATION: Release
ports:
- 8080:8080
environment:
ASPNETCORE_ENVIRONMENT: Development
# Feature selection
CasCap__FeatureConfig__EnabledFeatures: EdgeHardware,Ubiquiti,Comms
# Container hostname overrides (Development.json uses localhost, compose uses container names)
CasCap__CachingConfig__RemoteCacheConnectionString: redis:6379,allowAdmin=true,abortConnect=false
CasCap__SignalRHubConfig__SignalRHub: http://smarthaus:8080
CasCap__SignalCliConfig__BaseAddress: http://signalcli:8080
# Azurite connection strings (compose uses azurite hostname instead of 127.0.0.1)
CasCap__EdgeHardwareConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__UbiquitiConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__BuderusConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__DoorBirdConfig__AzureBlobStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://azurite:10000/devstoreaccount1;
CasCap__DoorBirdConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__FroniusConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__KnxConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__ShellyConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__MieleConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
CasCap__WizConfig__AzureTableStorageConnectionString: DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;TableEndpoint=http://azurite:10002/devstoreaccount1;
# AI — all providers point at the single Ollama instance
CasCap__AIConfig__Providers__EdgeGpu__Endpoint: http://ollama:11434
CasCap__AIConfig__Providers__EdgeGpu__ModelName: qwen3.5:4b
CasCap__AIConfig__Providers__EdgeGpuVL__Endpoint: http://ollama:11434
CasCap__AIConfig__Providers__EdgeOllamaCpuVLC__Endpoint: http://ollama:11434
CasCap__AIConfig__Providers__EdgeCpuWhisper__Endpoint: http://ollama:11434
depends_on:
redis:
condition: service_healthy
otelcol:
condition: service_started
signalcli:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-sf", "http://localhost:8080/healthz/live" ]
interval: 10s
timeout: 5s
retries: 10
start_period: 60s
restart: unless-stopped
# =============================================================================
# Volumes
# =============================================================================
volumes:
azurite_data:
ollama_data:
signalcli_data: