No description
https://zig-mirror.tsimnet.eu
- Zig 76%
- CSS 18.1%
- HTML 5.6%
- Dockerfile 0.3%
| src | refactor DirList to its own file | |
| .dockerignore | fix dockerignore | |
| .gitignore | zig 0.16.0-dev.2984+cb7d2b056 | |
| .gitlab-ci.yml | fix ci cmd format | |
| build.zig | add windows targets | |
| build.zig.zon | upgrade oci | |
| Dockerfile | ci: upgrade zig-container | |
| LICENSE | lic | |
| README.md | bump version to 0.4.0 | |
Zig Community Mirror
This is a simple mirroring http server to provide a zig community mirror:
https://ziglang.org/download/community-mirrors/
Following the hosting specification:
https://github.com/ziglang/www.ziglang.org/blob/main/MIRRORS.md
All files are validated using their minisign signatures and the ZSF key before being stored in the cache and sent to the client.
It is built on std.http using a std.ThreadPool, and features a directory listing of the cache dir,
and built in minizign for hash validation.
My personal deployment is located here
Running
mkdir -p zig-out/share/
zig build run -- serve ::1 8081 zig-out/share/
The mirror can be configured by the following environment variables:
# a f64 in days to cache the `-dev.` releases. By default, they are kept forever
ZIG_MIRROR_DEV_LIFETIME=0
# a u64 in seconds to cache the `index.json` file. By default, 300s (5min)
ZIG_MIRROR_INDEX_LIFETIME=300
Hosting
To fully comply, the server needs a IPv4/6 and TLS/SSL compatible Proxy, like nginx.
You can run the 8Mb Docker image:
docker run -it --rm -p 8081:8081 -e ZIG_MIRROR_LIFETIME=30 -v zig-mirror:/zig-mirror-cache registry.gitlab.com/dasimmet/zig-mirror:0.3.0