Merge pull request #383 from fastapiadmin/dev

fix(deploy): 优化 docker compose 依赖检查逻辑
This commit is contained in:
fastapiadmin
2026-05-12 17:05:50 +08:00
committed by GitHub
3 changed files with 11 additions and 9 deletions
+9 -7
View File
@@ -126,7 +126,7 @@ check_permissions() {
local missing_deps=() local missing_deps=()
local optional_deps_missing=() local optional_deps_missing=()
for cmd in git docker docker-compose; do for cmd in git docker; do
if ! command -v $cmd &> /dev/null; then if ! command -v $cmd &> /dev/null; then
missing_deps+=($cmd) missing_deps+=($cmd)
log "❌ $cmd 未安装" "ERROR" log "❌ $cmd 未安装" "ERROR"
@@ -136,12 +136,14 @@ check_permissions() {
fi fi
done done
if command -v docker &> /dev/null; then # 检查 docker compose(v2 带空格)或 docker-compose(v1 带短横线)
if docker compose version &> /dev/null; then if docker compose version &> /dev/null; then
log "🎉 docker compose 已安装 - $(docker compose version | head -n1)" "INFO" log "🎉 docker compose 已安装 - $(docker compose version | head -n1)" "INFO"
elif docker-compose --version &> /dev/null; then elif docker-compose --version &> /dev/null; then
log "🎉 docker-compose 已安装 - $(docker-compose --version | head -n1)" "INFO" log "🎉 docker-compose 已安装 - $(docker-compose --version | head -n1)" "INFO"
fi else
missing_deps+=("docker compose")
log "❌ docker compose / docker-compose 未安装" "ERROR"
fi fi
if [ -d "frontend/web" ] || [ -d "frontend/app" ] || [ -d "frontend/docs" ]; then if [ -d "frontend/web" ] || [ -d "frontend/app" ] || [ -d "frontend/docs" ]; then
+1 -1
View File
@@ -61,6 +61,7 @@ declare global {
const hexToRgb: typeof import('./utils/color')['hexToRgb'] const hexToRgb: typeof import('./utils/color')['hexToRgb']
const hideLoading: typeof import('./utils/notification')['hideLoading'] const hideLoading: typeof import('./utils/notification')['hideLoading']
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch'] const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
const initStore: typeof import('./store/index')['initStore']
const inject: typeof import('vue')['inject'] const inject: typeof import('vue')['inject']
const injectLocal: typeof import('@vueuse/core')['injectLocal'] const injectLocal: typeof import('@vueuse/core')['injectLocal']
const isDefined: typeof import('@vueuse/core')['isDefined'] const isDefined: typeof import('@vueuse/core')['isDefined']
@@ -147,7 +148,6 @@ declare global {
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix'] const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
const setRefreshToken: typeof import('./utils/auth')['setRefreshToken'] const setRefreshToken: typeof import('./utils/auth')['setRefreshToken']
const setUserInfo: typeof import('./utils/auth')['setUserInfo'] const setUserInfo: typeof import('./utils/auth')['setUserInfo']
const initStore: typeof import('./store/index')['initStore']
const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReactive: typeof import('vue')['shallowReactive']
const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowReadonly: typeof import('vue')['shallowReadonly']
const shallowRef: typeof import('vue')['shallowRef'] const shallowRef: typeof import('vue')['shallowRef']
+1 -1
View File
@@ -172,7 +172,7 @@
"vite-plugin-vue-devtools": "^7.7.6", "vite-plugin-vue-devtools": "^7.7.6",
"vue-demi": "^0.14.9", "vue-demi": "^0.14.9",
"vue-eslint-parser": "^10.2.0", "vue-eslint-parser": "^10.2.0",
"vue-img-cutter": "^3", "vue-img-cutter": "^3.0.5",
"vue-tsc": "^2.2.12" "vue-tsc": "^2.2.12"
}, },
"packageManager": "pnpm@9.15.3", "packageManager": "pnpm@9.15.3",