一键部署测试-2
This commit is contained in:
@@ -145,7 +145,7 @@ validate_env() {
|
||||
log_error "STORAGE_ENDPOINT 仍指向本机,请改为 http://minio:9000"
|
||||
exit 1
|
||||
fi
|
||||
if grep -Eq '=(change-|保持你的|你的)' "${BACKEND_ENV}"; then
|
||||
if awk -F= '/^[A-Z0-9_]+=/{ if ($0 ~ /=(change-|保持你的|你的)/) found=1 } END { exit found ? 0 : 1 }' "${BACKEND_ENV}"; then
|
||||
log_error "backend/.env 里还有占位值,请先替换后再部署"
|
||||
exit 1
|
||||
fi
|
||||
@@ -179,9 +179,7 @@ wait_service_healthy() {
|
||||
}
|
||||
|
||||
mysql_exec() {
|
||||
local password
|
||||
password="$(require_env MYSQL_PASSWORD)"
|
||||
compose exec -T -e MYSQL_PWD="${password}" mysql mysql -u"$(require_env MYSQL_USER)" "$@"
|
||||
compose exec -T mysql sh -c 'MYSQL_PWD="$MYSQL_PASSWORD" mysql -u"$MYSQL_USER" "$@"' sh "$@"
|
||||
}
|
||||
|
||||
mysql_scalar() {
|
||||
|
||||
Reference in New Issue
Block a user