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
Pass the proven git_cdn env vars on container run:
- PACK_CACHE_SIZE_GB=500 and GUNICORN_WORKER=12 (exposed as module options;
workers otherwise defaults to host cpu_count())
- PACK_CACHE_DEPTH=true to cache shallow clones
- CDN_BUNDLE_URL="" to disable the upstream Android/AOSP clone-bundle
default, irrelevant for a GitHub proxy
Verified every name/value against git_cdn source.
local dockername="${module_options["module_git_cdn,dockername"]}"
23
25
local port="${module_options["module_git_cdn,port"]}"
24
26
local upstream="${module_options["module_git_cdn,upstream"]}"
27
+
local cache_size_gb="${module_options["module_git_cdn,cache_size_gb"]}"
28
+
local workers="${module_options["module_git_cdn,workers"]}"
25
29
26
30
local commands
27
31
IFS=''read -r -a commands <<<"${module_options["module_git_cdn,example"]}"
@@ -47,6 +51,10 @@ function module_git_cdn () {
47
51
--publish "${port}:8000" \
48
52
--env GITSERVER_UPSTREAM="$upstream" \
49
53
--env WORKING_DIRECTORY="/git-data" \
54
+
--env GUNICORN_WORKER="$workers" \
55
+
--env PACK_CACHE_SIZE_GB="$cache_size_gb" \
56
+
--env PACK_CACHE_DEPTH="true" \
57
+
--env CDN_BUNDLE_URL="" \
50
58
--volume "${base_dir}/cache:/git-data" \
51
59
"$dockerimage";then
52
60
echo -e "\nFailed to start ${dockername} (${dockerimage})\n">&2
@@ -80,7 +88,7 @@ function module_git_cdn () {
80
88
;;
81
89
"${commands[4]}") # help
82
90
show_module_help "module_git_cdn""$title" \
83
-
"Caching git+http(s) proxy / CDN that mirrors one upstream git server near your CI workers, reducing WAN usage on repeated clones.\n\nUpstream: ${upstream}\nProxy port: ${port}\nDocker Image: ${dockerimage}\nCache directory: ${base_dir}/cache\n\nClient configuration — on each git host:\n git config --global url.\"http://<server>:${port}/\".insteadOf ${upstream}\n\nThen clone normally:\n git clone ${upstream}<owner>/<repo>.git"
91
+
"Caching git+http(s) proxy / CDN that mirrors one upstream git server near your CI workers, reducing WAN usage on repeated clones.\n\nUpstream: ${upstream}\nProxy port: ${port}\nDocker Image: ${dockerimage}\nCache directory: ${base_dir}/cache\nPack cache size: ${cache_size_gb} GB\nWorkers: ${workers}\n\nClient configuration — on each git host:\n git config --global url.\"http://<server>:${port}/\".insteadOf ${upstream}\n\nThen clone normally:\n git clone ${upstream}<owner>/<repo>.git"
0 commit comments