You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sequential probe — one server at a time on port 8080
Replace docker-compose with convention-based discovery from
src/Servers/*/probe.json. All servers now listen on port 8080 and are
built/run/probed/killed sequentially, eliminating port allocation and
simplifying the contributor experience to Dockerfile + probe.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
if echo "$CHANGED" | grep -qE '^(src/Http11Probe/|src/Http11Probe\.Cli/|Directory\.Build\.props|docker-compose\.yml|\.dockerignore|\.github/workflows/probe\.yml)'; then
58
+
if echo "$CHANGED" | grep -qE '^(src/Http11Probe/|src/Http11Probe\.Cli/|Directory\.Build\.props|\.dockerignore|\.github/workflows/probe\.yml)'; then
66
59
set_all
67
60
exit 0
68
61
fi
69
62
70
-
AFFECTED=""
63
+
AFFECTED='[]'
71
64
for row in $(echo "$SERVERS" | jq -r '.[] | @base64'); do
72
-
svc=$(echo "$row" | base64 -d | jq -r '.service')
73
65
dir=$(echo "$row" | base64 -d | jq -r '.dir')
66
+
name=$(echo "$row" | base64 -d | jq -r '.name')
74
67
if echo "$CHANGED" | grep -q "^src/Servers/${dir}/"; then
75
-
AFFECTED="$AFFECTED $svc"
68
+
AFFECTED=$(echo "$AFFECTED" | jq -c --arg d "$dir" --arg n "$name" '. + [{"dir": $d, "name": $n}]')
76
69
fi
77
70
done
78
71
79
-
echo "affected=${AFFECTED# }" >> "$GITHUB_OUTPUT"
72
+
echo "servers=$AFFECTED" >> "$GITHUB_OUTPUT"
80
73
81
74
- name: Setup .NET
82
-
if: steps.changes.outputs.affected != ''
75
+
if: steps.changes.outputs.servers != '[]'
83
76
uses: actions/setup-dotnet@v4
84
77
with:
85
78
dotnet-version: '10.0'
86
79
87
80
- name: Build probe CLI
88
-
if: steps.changes.outputs.affected != ''
81
+
if: steps.changes.outputs.servers != '[]'
89
82
run: dotnet build Http11Probe.slnx -c Release
90
83
91
-
# ── Start only affected servers via Docker Compose ──────────────
92
-
93
-
- name: Start servers
94
-
if: steps.changes.outputs.affected != ''
95
-
run: docker compose up -d --build ${{ steps.changes.outputs.affected }}
84
+
# ── Build / Run / Probe / Kill — one server at a time ──────────
96
85
97
-
- name: Wait for servers
98
-
if: steps.changes.outputs.affected != ''
86
+
- name: Probe servers
87
+
if: steps.changes.outputs.servers != '[]'
99
88
run: |
100
-
SERVERS='${{ steps.discover.outputs.servers }}'
101
-
for svc in ${{ steps.changes.outputs.affected }}; do
Copy file name to clipboardExpand all lines: docs/content/_index.md
+6-13Lines changed: 6 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,30 +52,23 @@ Http11Probe is designed so anyone can contribute their HTTP server and get compl
52
52
53
53
<divstyle="height:24px"></div>
54
54
55
-
**1. Write a minimal server** — Create a directory under `src/Servers/YourServer/` with a simple HTTP server that returns `200 OK` on `GET /`. Any language, any framework.
55
+
**1. Write a minimal server** — Create a directory under `src/Servers/YourServer/` with a simple HTTP server that listens on **port 8080** and returns `200 OK` on `GET /`. Any language, any framework.
56
56
57
57
<divstyle="height:16px"></div>
58
58
59
-
**2. Add a Dockerfile** — Build and run your server. It will use `network_mode: host` so it binds directly to the host network.
59
+
**2. Add a Dockerfile** — Build and run your server. It will run with `--network host`.
60
60
61
61
<divstyle="height:16px"></div>
62
62
63
-
**3. Add to docker-compose.yml** — Add a service entry with two labels. That's the only configuration needed:
63
+
**3. Add a `probe.json`** — One file, one field:
64
64
65
65
<divstyle="height:12px"></div>
66
66
67
-
```yaml
68
-
yourserver:
69
-
build:
70
-
context: .
71
-
dockerfile: src/Servers/YourServer/Dockerfile
72
-
network_mode: host
73
-
labels:
74
-
probe.port: "9020"
75
-
probe.name: "Your Server"
67
+
```json
68
+
{"name": "Your Server"}
76
69
```
77
70
78
71
<divstyle="height:24px"></div>
79
72
80
-
The CI pipeline auto-discovers servers from `docker-compose.yml` labels. No workflow edits, no test changes, no config files. Open a PR and the probe runs automatically.
73
+
The CI pipeline auto-discovers servers from `src/Servers/*/probe.json`. No workflow edits, no test changes, no config files. Open a PR and the probe runs automatically.
0 commit comments