deploy(M00-E): 完善菜单式部署骨架
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
# shellcheck source=lib.sh
|
||||
. "${SCRIPT_DIR}/lib.sh"
|
||||
|
||||
qipai_preflight() {
|
||||
qipai_print_context
|
||||
qipai_check_arch
|
||||
qipai_command_status git
|
||||
qipai_command_status bash
|
||||
qipai_command_status node
|
||||
qipai_command_status npm
|
||||
qipai_command_status mysql
|
||||
qipai_command_status nginx
|
||||
qipai_command_status pm2
|
||||
qipai_command_status openssl
|
||||
qipai_command_status curl
|
||||
|
||||
if command -v docker >/dev/null 2>&1; then
|
||||
qipai_warn "docker detected but this project does not use Docker"
|
||||
else
|
||||
qipai_pass "docker: not installed or not in PATH"
|
||||
fi
|
||||
|
||||
if command -v redis-server >/dev/null 2>&1; then
|
||||
qipai_warn "redis-server detected; Redis is reserved/disabled for MVP"
|
||||
else
|
||||
qipai_pass "redis: RESERVED/DISABLED"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "${1:-}" = "--run" ]; then
|
||||
qipai_preflight
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user