Sign inSign up

ramogh2404/tez

By ramogh2404

•Updated 25 days ago

A compact C++17 HTTP server built on Boost.Beast and Boost.Asio.

Image
0

1.1K

ramogh2404/tez repository overview

Tez — a compact C++17 HTTP server for JSON routes and static files.

⁠Tez

A compact C++17 HTTP server for local development, built on Boost.Beast and Boost.Asio. Serve fixed responses from JSON configuration, serve static files, and inspect request bodies at /echo.

Website⁠ · Source⁠ · Documentation⁠ · Issues⁠ · License⁠

⁠Version note

The source is being developed toward 1.1.0. Existing registry tags can contain the earlier implementation. The commands and capabilities below describe a build of the current source; do not assume a historical latest or 1.0.0 image has them. Check the published tags⁠, image revision, architecture, and digest before choosing a registry image.

⁠Run the development image

The publication workflow promotes verified linux/amd64 and linux/arm64 development builds to ramogh2404/tez:main. Confirm its source revision on the Tags page⁠ matches a verified 1.1.0 development build before using these instructions; the tag may lag the source.

docker pull ramogh2404/tez:main
docker run --rm --name tez \
  --read-only --cap-drop=ALL --security-opt=no-new-privileges \
  -p 127.0.0.1:8080:8080 ramogh2404/tez:main

main is a mutable development tag, not a stable release. For a deployment, replace it with the verified ramogh2404/tez@sha256:… digest recorded when pulling the image. The historical latest and 1.0.0 tags do not imply the same contents.

⁠Run the current source

git clone https://github.com/Amogh-2404/Tez.git
cd Tez
docker build -t tez:local .
docker run --rm --name tez \
  --read-only --cap-drop=ALL --security-opt=no-new-privileges \
  -p 127.0.0.1:8080:8080 tez:local

Then, in another terminal:

curl --fail http://127.0.0.1:8080/health

Stop with Ctrl-C or docker stop tez. The health endpoint returns {"status":"ok"}.

⁠Configure routes and static files

docker run --rm --name tez \
  --read-only --cap-drop=ALL --security-opt=no-new-privileges \
  -p 127.0.0.1:8080:8080 \
  --mount type=bind,src="$(pwd)/config.json",dst=/app/config.json,readonly \
  --mount type=bind,src="$(pwd)/static",dst=/app/static,readonly \
  tez:local

A route configuration looks like this:

{
  "/hello": {
    "status": "200 OK",
    "content_type": "text/plain; charset=utf-8",
    "body": "hello, Tez\n"
  }
}

A file at static/style.css is served at /static/style.css. Configured routes are loaded at startup; restart after editing them. Mounted files must be readable by UID 10001. Symlinks below the static root are rejected.

⁠Container defaults

SettingValue
Executable/usr/local/bin/Tez
User10001:10001
Listener inside container0.0.0.0:8080
Configuration/app/config.json
Static root/app/static
Request logsstderr, available through docker logs
FilesystemRead-only operation supported

Inspect options with docker run --rm tez:local --help, or print the version with docker run --rm tez:local --version.

Arguments after the image name extend the image's defaults. To tune workers, supply only the settings you want to change:

docker run --rm -p 127.0.0.1:8080:8080 tez:local \
  --threads 2 --max-connections 32 --timeout 15

The listener remains 0.0.0.0:8080, with routes from /app/config.json and files from /app/static. Explicit --address, --config, or --static-dir arguments override those defaults; the last value of a repeated option wins.

Validate mounted content without starting a listener:

docker run --rm --read-only \
  --mount type=bind,src="$(pwd)/config.json",dst=/content/config.json,readonly \
  --mount type=bind,src="$(pwd)/static",dst=/content/static,readonly \
  tez:local --config /content/config.json --static-dir /content/static --check-config

Validation reports the resolved paths and configured route count. It checks the configuration and static root, not every file or HTTP response.

⁠Scope and limits

HTTP/1.x sessions support keep-alive, ordered pipelining, chunked request bodies, HEAD, and Expect: 100-continue. Defaults include an 8 KiB header limit, 1 MiB request-body limit, 128 admitted connections, and 30-second socket phase deadlines. Static files are limited to 16 MiB; the file cache is limited to 50 entries and 32 MiB of logical data.

These are individual limits, not a process-memory guarantee. Use an explicit container memory and CPU budget. TLS, HTTP/2, HTTP/3, WebSocket, authentication, rate limiting, and persistent application storage are not implemented. Filesystem reads and logging remain synchronous within request handlers.

Tez is an independently maintained systems project. No current throughput ranking or production-readiness guarantee is claimed. Use a maintained TLS gateway and restrict backend access for any exposed deployment.

Full deployment reference⁠ · Security reports⁠

Maintained by R. Amogh. MIT licensed.

Tag summary

Content type

Image

Digest

sha256:275ff535e…

Size

5 MB

Last updated

7 months ago

docker pull ramogh2404/tez