Files
2026-06-18 09:48:05 +08:00

30 lines
649 B
Makefile

# PCM 部署便捷命令
# 用法:make build | up | down | logs | ps | deploy-staging
COMPOSE ?= docker compose
.PHONY: build up down restart logs ps health deploy-staging
build: ## 构建全部镜像
$(COMPOSE) build
up: ## 构建并后台启动全部服务
$(COMPOSE) up -d --build
down: ## 停止并移除容器
$(COMPOSE) down
restart: down up ## 重启
logs: ## 跟踪日志
$(COMPOSE) logs -f
ps: ## 查看服务状态
$(COMPOSE) ps
health: ## 探活后端
@curl -fsS http://localhost:$${BACKEND_PORT:-3000}/api/health && echo
deploy-staging: ## 一键部署到 staging(构建+启动+探活)
./scripts/deploy-staging.sh