mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-09 01:58:42 +00:00
perf: change lfs files download
This commit is contained in:
parent
24fe058fd9
commit
e3a755f703
4
.gitattributes
vendored
4
.gitattributes
vendored
@ -1,4 +0,0 @@
|
||||
*.mmdb filter=lfs diff=lfs merge=lfs -text
|
||||
*.mo filter=lfs diff=lfs merge=lfs -text
|
||||
*.ipdb filter=lfs diff=lfs merge=lfs -text
|
||||
leak_passwords.db filter=lfs diff=lfs merge=lfs -text
|
@ -48,12 +48,13 @@ ENV LANG=en_US.UTF-8 \
|
||||
|
||||
ENV UV_LINK_MODE=copy
|
||||
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
--mount=type=bind,source=utils/clean_site_packages.sh,target=clean_site_packages.sh \
|
||||
--mount=type=bind,source=requirements/collections.yml,target=collections.yml \
|
||||
--mount=type=bind,source=requirements/static_files.sh,target=static_files.sh \
|
||||
set -ex \
|
||||
&& uv venv \
|
||||
&& uv pip install -i${PIP_MIRROR} -r pyproject.toml \
|
||||
&& ln -sf $(pwd)/.venv /opt/py3
|
||||
&& ln -sf $(pwd)/.venv /opt/py3 \
|
||||
&& bash static_files.sh
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a2805a0264fc07ae597704841ab060edef8bf74654f525bc778cb9195d8cad0e
|
||||
size 2547712
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:860b4d38beff81667c64da41c026a7dd28c3c93a28ae61fefaa7c26875f35638
|
||||
size 73906864
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c5119fd8911a107a7112422ade326766fe3d9538ac15bca06e3c622191c84e18
|
||||
size 61086554
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b82b874152c798dda407ffe7544e1f5ec67efa1f5c334efc0d3893b8053b4be1
|
||||
size 3649897
|
30
requirements/static_files.sh
Normal file
30
requirements/static_files.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
CURRENT_DIR=$(cd "$(dirname "$0")" && pwd)
|
||||
BASE_DIR=$(dirname "$CURRENT_DIR")
|
||||
|
||||
VERSION=v0.0.1
|
||||
to_files="
|
||||
apps/common/utils/ip/geoip/GeoLite2-City.mmdb
|
||||
apps/common/utils/ip/ipip/ipipfree.ipdb
|
||||
apps/accounts/automations/check_account/leak_passwords.db
|
||||
"
|
||||
|
||||
for file in $to_files; do
|
||||
# Check if the file already exists
|
||||
file_path="${BASE_DIR}/$file"
|
||||
rm -f $file_path
|
||||
if [ -f "$file_path" ]; then
|
||||
echo "File $file already exists, skipping download."
|
||||
continue
|
||||
fi
|
||||
|
||||
filename=$(basename "$file")
|
||||
to_dir=$(dirname "$file_path")
|
||||
if [ ! -d "$to_dir" ]; then
|
||||
mkdir -p "$to_dir"
|
||||
fi
|
||||
wget "https://github.com/jumpserver/static/releases/download/${VERSION}/$filename" -O "${file_path}"
|
||||
echo "File $file downloaded successfully."
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user