Files
weipan02_server/docker/entrypoint.sh
2025-10-31 01:16:51 +08:00

20 lines
480 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
set -e
# 根据环境变量生成 .env 文件
cat > /app/.env <<EOF
[DATABASE]
HOSTNAME=${database_hostname:-10.100.100.88}
DATABASE=${database_database:-mydatabase}
USERNAME=${database_username:-myuser}
PASSWORD=${database_password:-mypassword}
CHARSET=${database_charset:-utf8mb4}
HOSTPORT=${database_hostport:-3306}
EOF
echo "Generated .env file:"
cat /app/.env
# 执行原始镜像的入口点webdevops 镜像使用 supervisord
exec /entrypoint supervisord