Skip to content

Commit

Permalink
lug: racket (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum authored Jul 9, 2024
1 parent 2808aca commit 47bd62b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions caddy/Caddyfile.siyuan
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ https://mirror.sjtu.edu.cn {
header /mirrorz/* Access-Control-Request-Method GET

@gzip_enabled {
not path /racket/*
not path /bmclapi/*
not path /alhp/*
not path /nspawn/*
Expand Down Expand Up @@ -324,6 +325,10 @@ https://mirror.sjtu.edu.cn {
}
encode @gzip_enabled gzip zstd

redir /racket /racket/ 301
handle /racket/* {
reverse_proxy rsync-gateway:8000
}
redir /bmclapi /bmclapi/ 301
handle /bmclapi/* {
reverse_proxy rsync-gateway:8000
Expand Down
5 changes: 5 additions & 0 deletions caddy/Caddyfile.zhiyuan
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ https://mirrors.sjtug.sjtu.edu.cn {
not path /registry.k8s.io/*
not path /google-fonts/*
not path /anaconda/*
not path /racket/*
not path /bmclapi/*
not path /alhp/*
not path /nspawn/*
Expand Down Expand Up @@ -573,6 +574,10 @@ https://mirrors.sjtug.sjtu.edu.cn {
@hidden path */.*
respond @hidden 404
}
redir /racket /racket/ 301
handle_path /racket/* {
redir * https://mirror.sjtu.edu.cn/racket{uri} 302
}
redir /bmclapi /bmclapi/ 301
handle_path /bmclapi/* {
redir * https://mirror.sjtu.edu.cn/bmclapi{uri} 302
Expand Down
9 changes: 9 additions & 0 deletions config.siyuan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ repos:
# no_redir_http: true
# <<: *oneshot_common

# racket
- type: shell_script
name: racket
script: /worker-script/rsync-fetcher.sh
interval: 13271
source: rsync://mirror.csclub.uwaterloo.ca/racket/racket-installers
serve_mode: rsync_gateway
<<: *rsync_fetcher_common
<<: *oneshot_common
# bmclapi
- type: shell_script
name: bmclapi
Expand Down
5 changes: 5 additions & 0 deletions rsync-gateway/config.siyuan.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ database_url = "postgres://rsync-sjtug@postgres/rsync-sjtug"
format = "json"
target = "tcp://tunnel:5007"

[endpoints.racket]
namespace = "racket"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
s3_prefix = "rsync/racket"

[endpoints.bmclapi]
namespace = "bmclapi"
s3_bucket = "899a892efef34b1b944a19981040f55b-oss01"
Expand Down

0 comments on commit 47bd62b

Please sign in to comment.