25.09.16 update

This commit is contained in:
jinql
2025-09-16 16:12:38 +08:00
parent 96a975b9ad
commit c5dd60a82d
4 changed files with 33 additions and 38 deletions

View File

@@ -9,31 +9,39 @@ gunicorn_conf="/app/conf/gunicorn.conf.py"
logging_conf="/app/conf/logging.yaml"
if [ ! -f "$gunicorn_conf" ]; then
echo "复制gunicorn.conf.py..."
if [ -f "$default_conf_dir/gunicorn_conf_py" ]; then
cp "$default_conf_dir/gunicorn_conf_py" "$gunicorn_conf"
echo "复制 gunicorn.conf.py..."
if [ -f "${default_conf_dir}/gunicorn_conf_py" ]; then
cp "${default_conf_dir}/gunicorn_conf_py" "$gunicorn_conf"
chmod 644 "$gunicorn_conf"
echo "复制gunicorn.conf.py成功"
echo "复制 gunicorn.conf.py 成功"
else
echo "警告:默认配置文件 $default_conf_dir/gunicorn_conf_py 不存在,创建空文件"
echo "警告:默认配置文件 ${default_conf_dir}/gunicorn_conf_py 不存在,创建空文件"
touch "$gunicorn_conf"
chmod 644 "$gunicorn_conf"
fi
fi
if [ ! -f "$logging_conf" ]; then
echo "复制logging.yaml..."
if [ -f "$default_conf_dir/logging.yaml" ]; then
cp "$default_conf_dir/logging.yaml" "$logging_conf"
echo "复制 logging.yaml..."
if [ -f "${default_conf_dir}/logging.yaml" ]; then
cp "${default_conf_dir}/logging.yaml" "$logging_conf"
chmod 644 "$logging_conf"
echo "复制logging.yaml成功"
echo "复制 logging.yaml 成功"
else
echo "警告:默认配置文件 $default_conf_dir/logging.yaml 不存在,创建空文件"
echo "警告:默认配置文件 ${default_conf_dir}/logging.yaml 不存在,创建空文件"
touch "$logging_conf"
chmod 644 "$logging_conf"
fi
fi
mkdir -p /app/logs /app/data
if [ ! -d "/app/logs" ]; then
mkdir -p /app/logs
chmod 755 /app/logs
fi
if [ ! -d "/app/data" ]; then
mkdir -p /app/data
chmod 755 /app/data
fi
exec "$@"