Skip to content

Commit dafc949

Browse files
author
Forgemaster
committed
deploy: lightweight streaming server Docker image
- Dockerfile.streaming: 50MB, pip install sonar-vision-physics - docker-compose.streaming.yml: server + nginx dashboard - Health check on port 8081 - ghcr.io/superinstance/sonar-vision-streaming:latest
1 parent e4a0727 commit dafc949

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Dockerfile.streaming

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SonarVision Physics — Lightweight Streaming Server
2+
# Distroless: ~50MB, 0 external deps beyond sonar-vision-physics
3+
FROM python:3.11-slim AS base
4+
5+
RUN pip install --no-cache-dir sonar-vision-physics==1.0.1
6+
7+
EXPOSE 8081
8+
9+
# Health check
10+
HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
11+
CMD python3 -c "import socket; s=socket.socket(); s.connect(('localhost',8081)); s.close()"
12+
13+
ENTRYPOINT ["sonar-ping", "--serve", "--port", "8081", "--rate", "5.0"]

docker-compose.streaming.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
sonar-vision:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile.streaming
6+
image: ghcr.io/superinstance/sonar-vision-streaming:latest
7+
ports:
8+
- "8081:8081"
9+
restart: unless-stopped
10+
healthcheck:
11+
test: ["CMD", "python3", "-c", "import socket; s=socket.socket(); s.settimeout(3); s.connect(('localhost',8081)); s.close()"]
12+
interval: 10s
13+
timeout: 3s
14+
retries: 3
15+
16+
dashboard:
17+
image: nginx:alpine
18+
ports:
19+
- "8080:80"
20+
volumes:
21+
- ./dashboard:/usr/share/nginx/html:ro
22+
depends_on:
23+
- sonar-vision

0 commit comments

Comments
 (0)