fix
This commit is contained in:
@@ -42,10 +42,16 @@ fi
|
||||
mkdir -p "${HOST_DATA_DIR}"
|
||||
echo "Data dir (host): ${HOST_DATA_DIR} -> container /app/backend/data"
|
||||
|
||||
ENV_FILE=".env"
|
||||
if [ ! -f "${ENV_FILE}" ]; then
|
||||
echo "Env file ${ENV_FILE} not found, copying from .env.example ..."
|
||||
cp .env.example "${ENV_FILE}"
|
||||
# 优先使用 .env.prod 作为生产环境配置(例如在服务器上单独维护 CALLBACK_BASE_URL 等),
|
||||
# 若不存在则回退到 .env;再没有则从 .env.example 复制一份。
|
||||
if [ -f ".env.prod" ]; then
|
||||
ENV_FILE=".env.prod"
|
||||
else
|
||||
ENV_FILE=".env"
|
||||
if [ ! -f "${ENV_FILE}" ]; then
|
||||
echo "Env file ${ENV_FILE} not found, copying from .env.example ..."
|
||||
cp .env.example "${ENV_FILE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Running container ${CONTAINER_NAME} (frontend :${PORT}, backend :${BACKEND_PORT})..."
|
||||
|
||||
Reference in New Issue
Block a user