Files
document/document-docker/entrypoint.sh

24 lines
800 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# 确保目录存在
mkdir -p /etc/services.d/java
# 创建Java服务启动脚本
cat > /etc/services.d/java/run <<EOF
#!/bin/sh
exec java -jar /app/application.jar \
--server.port=${DOCUMENT_SERVER_PORT} \
--spring.config.location=/app/application.yml \
--jodconverter.local.port-numbers=${PORT_NUMBERS} \
--jodconverter.local.max-tasks-per-process=${MAX_TASKS_PER_PROCESS} \
--document.gramer.prefix="${GRAMER_PREFIX}" \
--document.gramer.suffix="${GRAMER_SUFFIX}" \
--document.gramer.customize-list="${GRAMER_CUSTOMIZE_LIST}" \
--document.gramer.customize-list-string-delimiting="${GRAMER_CUSTOMIZE_LIST_STRING_DELIMITING}"
EOF
# 设置可执行权限
chmod +x /etc/services.d/java/run
# 启动s6-overlay它会自动管理所有服务
exec /init