Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 0

Python超人/Stirling-PDF

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
main
Branches (26)
Tags (79)
main
dependabot/docker/gradle-8.9-jdk17
v2-wip
versionBump
dependabot/docker/alpine-3.20.1
pixeebot/decrypt
decrypt
dependabot/gradle/com.twelvemonkeys.imageio-imageio-tiff-3.11.0
dependabot/gradle/springBootVersion-3.3.1
snyk-fix-eee4e0fe117e86faf3ed21156d258ec0
snyk-fix-1824944fb6560bc5ab1be7a1323d6bc4
update-3rd-party-licenses
master
survey
dependabot/gradle/io.micrometer-micrometer-core-1.13.0
dependabot/gradle/org.bouncycastle-bcpkix-jdk18on-1.78.1
dependabot/gradle/org.bouncycastle-bcprov-jdk18on-1.78.1
pipelineFixes
imagesAndLoginContext
fix-crop-pdf-name
v0.26.1
v0.26.0
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.6
v0.24.5
v0.24.4
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.1
v0.23.0
v0.22.8
v0.22.7
v0.22.6
v0.22.5
v0.22.4
main
Branches (26)
Tags (79)
main
dependabot/docker/gradle-8.9-jdk17
v2-wip
versionBump
dependabot/docker/alpine-3.20.1
pixeebot/decrypt
decrypt
dependabot/gradle/com.twelvemonkeys.imageio-imageio-tiff-3.11.0
dependabot/gradle/springBootVersion-3.3.1
snyk-fix-eee4e0fe117e86faf3ed21156d258ec0
snyk-fix-1824944fb6560bc5ab1be7a1323d6bc4
update-3rd-party-licenses
master
survey
dependabot/gradle/io.micrometer-micrometer-core-1.13.0
dependabot/gradle/org.bouncycastle-bcpkix-jdk18on-1.78.1
dependabot/gradle/org.bouncycastle-bcprov-jdk18on-1.78.1
pipelineFixes
imagesAndLoginContext
fix-crop-pdf-name
v0.26.1
v0.26.0
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.6
v0.24.5
v0.24.4
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.1
v0.23.0
v0.22.8
v0.22.7
v0.22.6
v0.22.5
v0.22.4
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
main
Branches (26)
Tags (79)
main
dependabot/docker/gradle-8.9-jdk17
v2-wip
versionBump
dependabot/docker/alpine-3.20.1
pixeebot/decrypt
decrypt
dependabot/gradle/com.twelvemonkeys.imageio-imageio-tiff-3.11.0
dependabot/gradle/springBootVersion-3.3.1
snyk-fix-eee4e0fe117e86faf3ed21156d258ec0
snyk-fix-1824944fb6560bc5ab1be7a1323d6bc4
update-3rd-party-licenses
master
survey
dependabot/gradle/io.micrometer-micrometer-core-1.13.0
dependabot/gradle/org.bouncycastle-bcpkix-jdk18on-1.78.1
dependabot/gradle/org.bouncycastle-bcprov-jdk18on-1.78.1
pipelineFixes
imagesAndLoginContext
fix-crop-pdf-name
v0.26.1
v0.26.0
v0.25.3
v0.25.2
v0.25.1
v0.25.0
v0.24.6
v0.24.5
v0.24.4
v0.24.3
v0.24.2
v0.24.1
v0.24.0
v0.23.1
v0.23.0
v0.22.8
v0.22.7
v0.22.6
v0.22.5
v0.22.4
Stirling-PDF
/
test2.sh
Stirling-PDF
/
test2.sh
test2.sh 3.75 KB
Copy Edit Raw Blame History
Anthony Stirling authored 2024年04月02日 01:33 +08:00 . remove lite package (#1012)
#!/bin/bash
# Default values
build_type="full"
enable_security="false"
run_compose="true"
# Function to parse command line arguments
parse_args() {
case "1ドル" in
""|-lite|-ultra-lite) build_type="1ドル";;
esac
case "2ドル" in
true|false) enable_security="2ドル";;
esac
case "3ドル" in
true|false) run_compose="3ドル";;
esac
}
# Function to check the health of the service with a timeout of 80 seconds
check_health() {
local service_name=1ドル
local compose_file=2ドル
local end=$((SECONDS+80)) # Fixed the timeout to be 80 seconds as per the function comment
echo -n "Waiting for $service_name to become healthy..."
until [ "$(docker inspect --format='{{json .State.Health.Status}}' "$service_name")" == '"healthy"' ] || [ $SECONDS -ge $end ]; do
sleep 3
echo -n "."
if [ $SECONDS -ge $end ]; then
echo -e "\n$service_name health check timed out after 80 seconds."
echo "Printing logs for $service_name:"
docker logs "$service_name"
return 1
fi
done
echo -e "\n$service_name is healthy!"
echo "Printing logs for $service_name:"
docker logs "$service_name"
return 0
}
# Function to build and test a Docker Compose configuration
# Function to build and test a Docker Compose configuration
# Function to build and test a Docker Compose configuration
build_and_test() {
local version_tag="alpha"
local dockerfile_name="./Dockerfile"
local image_base="frooodle/s-pdf"
local security_suffix=""
local docker_compose_base="./exampleYmlFiles/docker-compose-latest"
local compose_suffix=".yml"
local service_name_base="Stirling-PDF"
if [ "$enable_security" == "true" ]; then
security_suffix="-Security"
docker_compose_base+="-security" # Append to base name for Docker Compose files with security
fi
case "$build_type" in
full)
dockerfile_name="./Dockerfile"
;;
ultra-lite)
dockerfile_name="./Dockerfile-ultra-lite"
;;
esac
# Dynamic image tag and service name based on build type and security
local image_tag="${image_base}:latest${build_type}${security_suffix}"
local service_name="${service_name_base}${build_type^}${security_suffix}"
local compose_file="${docker_compose_base}${build_type}${compose_suffix}"
# Gradle build with or without security
echo "Running ./gradlew clean build with security=$enable_security..."
./gradlew clean build
if [ $? -ne 0 ]; then
echo "Gradle build failed, exiting script."
exit 1
fi
# Building Docker image
echo "Building Docker image $image_tag with Dockerfile $dockerfile_name..."
docker build --build-arg VERSION_TAG=$version_tag -t $image_tag -f $dockerfile_name .
if [ "$run_compose" == "true" ]; then
echo "Running Docker Compose for $build_type with security=$enable_security..."
docker-compose -f "$compose_file" up -d
# Health check using the dynamic service name
if ! check_health "$service_name" "$compose_file"; then
echo "$service_name health check failed."
docker-compose -f "$compose_file" down
exit 1
else
# If the health check passes, prompt the user to press any key to tear down the service
read -n 1 -s -r -p "Health check passed. Press any key to tear down the service."
echo "" # Move to a new line
# Tear down the service
docker-compose -f "$compose_file" down
fi
# Tear down the service after the health check passes
#docker-compose -f "$compose_file" down
fi
}
# Main function
main() {
SECONDS=0
parse_args "$@"
build_and_test
echo "All operations completed in $SECONDS seconds."
}
main "$@"
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

Cancel

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pythoncr/Stirling-PDF.git
git@gitee.com:pythoncr/Stirling-PDF.git
pythoncr
Stirling-PDF
Stirling-PDF
main
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /