-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add yukina * yukina: update version
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM ustcmirror/base:alpine | ||
LABEL maintainer "Keyu Tao <taoky AT ustclug.org>" | ||
ARG YUKINA_VERSION=20240331-2 | ||
|
||
RUN apk add --no-cache wget ca-certificates zstd && \ | ||
cd /tmp/ && wget -q "https://github.com/taoky/yukina/releases/download/${YUKINA_VERSION}/yukina" && \ | ||
mv /tmp/yukina /usr/local/bin/ && \ | ||
chmod +x /usr/local/bin/yukina && \ | ||
rm -rf /tmp/* && apk del wget | ||
|
||
ADD sync.sh / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
## EXPORTED IN entry.sh | ||
#TO= | ||
#REPO= | ||
|
||
## SET IN ENVIRONMENT VARIABLES | ||
#BIND_ADDRESS= | ||
#UPSTREAM= | ||
#YUKINA_SIZE_LIMIT= | ||
#YUKINA_FILTER= | ||
#YUKINA_EXTRA= | ||
|
||
set -eu | ||
[[ $DEBUG = true ]] && set -x | ||
|
||
BIND_ADDRESS=${BIND_ADDRESS:-} | ||
YUKINA_SIZE_LIMIT=${YUKINA_SIZE_LIMIT:-"512g"} | ||
YUKINA_FILTER=${YUKINA_FILTER:-} | ||
YUKINA_EXTRA=${YUKINA_EXTRA:-} | ||
|
||
if [[ $DEBUG = true ]]; then | ||
export RUST_LOG="yukina=debug" | ||
fi | ||
|
||
export NO_COLOR=1 | ||
|
||
exec yukina --name "$REPO" \ | ||
--log-path "/nginx-log" \ | ||
--repo-path "$TO" \ | ||
--size-limit "$YUKINA_SIZE_LIMIT" \ | ||
--url "$UPSTREAM" \ | ||
--remote-sizedb "$TO/.yukina-remote.db" \ | ||
--local-sizedb "$TO/.yukina-local.db" \ | ||
$YUKINA_FILTER $YUKINA_EXTRA |