Skip to content

Instantly share code, notes, and snippets.

@Duncaen
Duncaen / nginx.conf
Last active September 27, 2023 15:48
voidlinux nginx caching repository proxy
proxy_cache_path /repo_cache use_temp_path=off keys_zone=repo_cache:5m max_size=20g inactive=7d;
server {
server_name _;
listen 80;
proxy_cache repo_cache;
# if the backend is not reachable use cache
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
#!/bin/bash
dry=0
if [[ $# -gt 0 && $1 == "-n" ]]; then
dry=1
shift
fi
prefix="v"
if [[ $# -gt 0 ]]; then
if [[ $1 = -* || $# -gt 1 ]]; then