Files
CasSsoService/docker/run-cas.sh
T

13 lines
673 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
# CAS 启动入口
# 配置注入:启动前用 python3 从 Nacos 拉 common.yaml+cas.yaml 生成 /etc/cas/config/cas.properties。
# 替代失效的 EnvironmentPostProcessor(CAS 5.3 + Spring Cloud bootstrap 下 EPP 不触发)。
# CAS 5.3 原生加载 /etc/cas/config/cas.properties(profile=standalone),优先级高于 classpath application.yml。
set -e
echo "[run-cas] Nacos 配置注入:NACOS_ADDR=${NACOS_ADDR:-<unset>} NACOS_NAMESPACE=${NACOS_NAMESPACE:-<unset>} NACOS_USER=${NACOS_USER:-<unset>}"
python3 /app/nacos_config.py || echo "[run-cas] WARN: nacos_config.py 失败,用镜像内 cas.properties 兜底"
exec java -jar /app/cas.war