diff --git a/Dockerfile b/Dockerfile index 9e716fa..2aab39f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,6 +7,6 @@ RUN go build -o /cache-proxy ./cmd/proxy FROM docker.io/library/alpine:3.21 as runtime COPY --from=0 /cache-proxy /bin/cache-proxy -WORKDIR /etc/ +WORKDIR / VOLUME /data CMD cache-proxy diff --git a/compose.yaml b/compose.yaml index 7f4d239..2735ee5 100644 --- a/compose.yaml +++ b/compose.yaml @@ -7,13 +7,13 @@ services: restart: always volumes: - - ./config.yaml:/etc/config.yaml:ro + - ./config.yaml:/config.yaml:ro - ./data:/data ports: - 8881:8881 environment: - - HTTPS_PROXY=http://100.64.0.23:7897 - - HTTP_PROXY=http://100.64.0.23:7897 - - ALL_PROXY=http://100.64.0.23:7897 + - HTTPS_PROXY=http://100.64.0.23:7890 + - HTTP_PROXY=http://100.64.0.23:7890 + - ALL_PROXY=http://100.64.0.23:7890 - SENTRY_DSN=https://f67f22a7d459544ea705e3d7872d680b@o353589.ingest.us.sentry.io/4508486851166208 - LOG_LEVEL=debug \ No newline at end of file diff --git a/config.yaml b/config.yaml index 5c0d42d..52e24b7 100644 --- a/config.yaml +++ b/config.yaml @@ -3,11 +3,11 @@ upstream: match: match: /(debian|ubuntu|ubuntu-releases|alpine|archlinux|kali|manjaro|msys2|almalinux|rocky|centos|centos-stream|centos-vault|fedora|epel|gnu)/(.*) replace: '/$1/$2' -- server: http://mirrors.tencent.com +- server: https://mirrors.tencent.com match: match: /(debian|ubuntu|ubuntu-releases|alpine|archlinux|kali|manjaro|msys2|almalinux|rocky|centos|centos-stream|centos-vault|fedora|epel|gnu)/(.*) replace: '/$1/$2' -- server: http://mirrors.ustc.edu.cn +- server: https://mirrors.ustc.edu.cn match: match: /(debian|ubuntu|ubuntu-releases|alpine|archlinux|kali|manjaro|msys2|almalinux|rocky|centos|centos-stream|centos-vault|fedora|epel|elrepo|remi|rpmfusion|tailscale|gnu|rust-static)/(.*) replace: '/$1/$2' @@ -19,7 +19,7 @@ upstream: match: match: /ubuntu/(.*) replace: /$1 -- server: http://releases.ubuntu.com/ +- server: https://releases.ubuntu.com/ match: match: /ubuntu-releases/(.*) replace: /$1 @@ -43,7 +43,7 @@ upstream: match: match: /kylinlinux/(.*) replace: /$1 -- server: http://cdn.jsdelivr.net +- server: https://cdn.jsdelivr.net match: match: /jsdelivr/(.*) replace: /$1 @@ -67,7 +67,7 @@ upstream: match: match: /epel/(.*) replace: /$1 -- server: http://deb.debian.org +- server: https://deb.debian.org match: match: /(debian|debian-security)/(.*) replace: /$1/$2 @@ -92,7 +92,7 @@ misc: cache: timeout: 1h policies: - - match: '.*\.(rpm|deb|apk)$' # rpm/deb/apk won't change, create only + - match: '.*\.(rpm|deb|apk|iso)$' # rpm/deb/apk/iso won't change, create only refresh-after: never - match: '^/.*-security/.*' # mostly ubuntu/debian security refresh-after: 1h