Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
**/bin/
**/obj/
**/target/
**/node_modules/
.git/
docs/
147 changes: 17 additions & 130 deletions .github/workflows/probe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,119 +26,15 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0
10.0
dotnet-version: '10.0'

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
cache: maven

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Build
- name: Build probe CLI
run: dotnet build Http11Probe.slnx -c Release

- name: Install Flask
run: pip install flask

- name: Install Express
run: npm install --prefix src/Servers/ExpressServer
# ── Start all servers via Docker Compose ──────────────────────────

- name: Install Nginx, Apache, and system dependencies
run: sudo apt-get update && sudo apt-get install -y nginx apache2 pkg-config libssl-dev

- name: Download Caddy
run: |
curl -o caddy -fsSL "https://caddyserver.com/api/download?os=linux&arch=amd64"
chmod +x caddy

- name: Build Java servers
run: |
mvn package -q -DskipTests -f src/Servers/SpringBootServer/pom.xml
mvn package -q -DskipTests -f src/Servers/QuarkusServer/pom.xml
mvn package -q -DskipTests -f src/Servers/JettyServer/pom.xml

- name: Build Pingora
run: cargo build --release --manifest-path src/Servers/PingoraServer/Cargo.toml

# ── Start all servers ──────────────────────────────────────────────

- name: Start GlyphServer
run: |
dotnet run --no-build -c Release --project src/Servers/GlyphServer -- 9001 &
echo $! > glyph.pid

- name: Start Kestrel (AspNetMinimal)
run: |
dotnet run --no-build -c Release --project src/Servers/AspNetMinimal &
echo $! > kestrel.pid

- name: Start Flask
run: |
python3 src/Servers/FlaskServer/app.py 9002 &
echo $! > flask.pid

- name: Start Express
run: |
node src/Servers/ExpressServer/server.js 9003 &
echo $! > express.pid

- name: Start Spring Boot
run: |
java -jar src/Servers/SpringBootServer/target/*.jar --server.port=9004 --server.address=127.0.0.1 &
echo $! > spring.pid

- name: Start Quarkus
run: |
java -Dquarkus.http.port=9005 -jar src/Servers/QuarkusServer/target/quarkus-app/quarkus-run.jar &
echo $! > quarkus.pid

- name: Start Nancy
run: |
dotnet run --no-build -c Release --project src/Servers/NancyServer -- 9006 &
echo $! > nancy.pid

- name: Start Jetty
run: |
java -jar src/Servers/JettyServer/target/jetty-server-1.0.0.jar 9007 &
echo $! > jetty.pid

- name: Start Nginx
run: |
nginx -c $GITHUB_WORKSPACE/src/Servers/NginxServer/nginx.conf &
echo $! > nginx.pid

- name: Start Apache
run: |
sudo sed -i 's/Listen 80/Listen 9009/' /etc/apache2/ports.conf
sudo sed -i 's/:80/:9009/' /etc/apache2/sites-enabled/000-default.conf
echo "OK" | sudo tee /var/www/html/index.html
sudo apache2ctl start

- name: Start Caddy
run: |
./caddy run --config src/Servers/CaddyServer/Caddyfile --adapter caddyfile &
echo $! > caddy.pid

- name: Start Pingora
run: |
src/Servers/PingoraServer/target/release/pingora-server 9011 &
echo $! > pingora.pid
- name: Start servers
run: docker compose up -d --build

- name: Wait for servers
run: |
Expand Down Expand Up @@ -249,19 +145,7 @@ jobs:

- name: Stop servers
if: always()
run: |
kill $(cat glyph.pid) 2>/dev/null || true
kill $(cat kestrel.pid) 2>/dev/null || true
kill $(cat flask.pid) 2>/dev/null || true
kill $(cat express.pid) 2>/dev/null || true
kill $(cat spring.pid) 2>/dev/null || true
kill $(cat quarkus.pid) 2>/dev/null || true
kill $(cat nancy.pid) 2>/dev/null || true
kill $(cat jetty.pid) 2>/dev/null || true
kill $(cat nginx.pid) 2>/dev/null || true
sudo apache2ctl stop 2>/dev/null || true
kill $(cat caddy.pid) 2>/dev/null || true
kill $(cat pingora.pid) 2>/dev/null || true
run: docker compose down

# ── Process results ────────────────────────────────────────────────

Expand Down Expand Up @@ -687,25 +571,28 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Push to gh-pages
- name: Push to latest-results
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch origin gh-pages || git checkout --orphan gh-pages
git worktree add /tmp/gh-pages gh-pages || true
mkdir -p /tmp/gh-pages/probe
cp probe-data.js /tmp/gh-pages/probe/data.js
cd /tmp/gh-pages
if git fetch origin latest-results 2>/dev/null; then
git worktree add /tmp/latest-results origin/latest-results
else
git worktree add --orphan /tmp/latest-results latest-results
fi
mkdir -p /tmp/latest-results/probe
cp probe-data.js /tmp/latest-results/probe/data.js
cd /tmp/latest-results
git add probe/data.js
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "Update probe results"
git push origin gh-pages
git push origin HEAD:latest-results
fi
cd -
git worktree remove /tmp/gh-pages || true
git worktree remove /tmp/latest-results || true

- name: Rebuild docs
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main'
Expand Down
73 changes: 73 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
services:

glyph:
build:
context: .
dockerfile: src/Servers/GlyphServer/Dockerfile
network_mode: host

kestrel:
build:
context: .
dockerfile: src/Servers/AspNetMinimal/Dockerfile
network_mode: host

flask:
build:
context: .
dockerfile: src/Servers/FlaskServer/Dockerfile
network_mode: host

express:
build:
context: .
dockerfile: src/Servers/ExpressServer/Dockerfile
network_mode: host

spring:
build:
context: .
dockerfile: src/Servers/SpringBootServer/Dockerfile
network_mode: host

quarkus:
build:
context: .
dockerfile: src/Servers/QuarkusServer/Dockerfile
network_mode: host

nancy:
build:
context: .
dockerfile: src/Servers/NancyServer/Dockerfile
network_mode: host

jetty:
build:
context: .
dockerfile: src/Servers/JettyServer/Dockerfile
network_mode: host

nginx:
build:
context: .
dockerfile: src/Servers/NginxServer/Dockerfile
network_mode: host

apache:
build:
context: .
dockerfile: src/Servers/ApacheServer/Dockerfile
network_mode: host

caddy:
build:
context: .
dockerfile: src/Servers/CaddyServer/Dockerfile
network_mode: host

pingora:
build:
context: .
dockerfile: src/Servers/PingoraServer/Dockerfile
network_mode: host
4 changes: 4 additions & 0 deletions src/Servers/ApacheServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM httpd:2.4

COPY src/Servers/ApacheServer/httpd-probe.conf /usr/local/apache2/conf/httpd.conf
RUN echo "OK" > /usr/local/apache2/htdocs/index.html
16 changes: 16 additions & 0 deletions src/Servers/ApacheServer/httpd-probe.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ServerRoot "/usr/local/apache2"
Listen 9009

LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule dir_module modules/mod_dir.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule authz_core_module modules/mod_authz_core.so

ErrorLog /proc/self/fd/2
LogLevel warn

DocumentRoot "/usr/local/apache2/htdocs"

<Directory "/usr/local/apache2/htdocs">
Require all granted
</Directory>
11 changes: 11 additions & 0 deletions src/Servers/AspNetMinimal/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY Directory.Build.props .
COPY src/Servers/AspNetMinimal/ src/Servers/AspNetMinimal/
RUN dotnet restore src/Servers/AspNetMinimal/AspNetMinimal.csproj
RUN dotnet publish src/Servers/AspNetMinimal/AspNetMinimal.csproj -c Release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "AspNetMinimal.dll"]
2 changes: 2 additions & 0 deletions src/Servers/CaddyServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM caddy:2
COPY src/Servers/CaddyServer/Caddyfile /etc/caddy/Caddyfile
6 changes: 6 additions & 0 deletions src/Servers/ExpressServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:22-slim
WORKDIR /app
COPY src/Servers/ExpressServer/package.json .
RUN npm install --omit=dev
COPY src/Servers/ExpressServer/server.js .
ENTRYPOINT ["node", "server.js", "9003"]
5 changes: 5 additions & 0 deletions src/Servers/FlaskServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM python:3.12-slim
WORKDIR /app
RUN pip install --no-cache-dir flask
COPY src/Servers/FlaskServer/app.py .
ENTRYPOINT ["python3", "app.py", "9002"]
11 changes: 11 additions & 0 deletions src/Servers/GlyphServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY Directory.Build.props .
COPY src/Servers/GlyphServer/ src/Servers/GlyphServer/
RUN dotnet restore src/Servers/GlyphServer/GlyphServer.csproj
RUN dotnet publish src/Servers/GlyphServer/GlyphServer.csproj -c Release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/runtime:10.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "GlyphServer.dll", "9001"]
11 changes: 11 additions & 0 deletions src/Servers/JettyServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /src
COPY src/Servers/JettyServer/pom.xml .
RUN mvn dependency:go-offline -q
COPY src/Servers/JettyServer/src/ src/
RUN mvn package -q -DskipTests

FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /src/target/jetty-server-1.0.0.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar", "9007"]
11 changes: 11 additions & 0 deletions src/Servers/NancyServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY Directory.Build.props .
COPY src/Servers/NancyServer/ src/Servers/NancyServer/
RUN dotnet restore src/Servers/NancyServer/NancyServer.csproj
RUN dotnet publish src/Servers/NancyServer/NancyServer.csproj -c Release -o /app --no-restore

FROM mcr.microsoft.com/dotnet/runtime:8.0
WORKDIR /app
COPY --from=build /app .
ENTRYPOINT ["dotnet", "NancyServer.dll", "9006"]
2 changes: 2 additions & 0 deletions src/Servers/NginxServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM nginx:1.27
COPY src/Servers/NginxServer/nginx.conf /etc/nginx/nginx.conf
15 changes: 15 additions & 0 deletions src/Servers/PingoraServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM rust:1-slim AS build
RUN apt-get update && apt-get install -y pkg-config libssl-dev cmake g++ && rm -rf /var/lib/apt/lists/*
WORKDIR /src

# Cache dependencies with dummy main
COPY src/Servers/PingoraServer/Cargo.toml .
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src target/release/.fingerprint/pingora-server-*

COPY src/Servers/PingoraServer/src/ src/
RUN cargo build --release

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y libssl3 && rm -rf /var/lib/apt/lists/*
COPY --from=build /src/target/release/pingora-server /usr/local/bin/
ENTRYPOINT ["pingora-server", "9011"]
11 changes: 11 additions & 0 deletions src/Servers/QuarkusServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /src
COPY src/Servers/QuarkusServer/pom.xml .
RUN mvn dependency:go-offline -q
COPY src/Servers/QuarkusServer/src/ src/
RUN mvn package -q -DskipTests

FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /src/target/quarkus-app/ quarkus-app/
ENTRYPOINT ["java", "-Dquarkus.http.port=9005", "-jar", "quarkus-app/quarkus-run.jar"]
11 changes: 11 additions & 0 deletions src/Servers/SpringBootServer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven:3.9-eclipse-temurin-21 AS build
WORKDIR /src
COPY src/Servers/SpringBootServer/pom.xml .
RUN mvn dependency:go-offline -q
COPY src/Servers/SpringBootServer/src/ src/
RUN mvn package -q -DskipTests

FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /src/target/*.jar app.jar
ENTRYPOINT ["java", "-jar", "app.jar", "--server.port=9004", "--server.address=127.0.0.1"]
Loading