Adds rebuild and redeploy make targets
WHAT: Adds `rebuild` and `redeploy` make targets to streamline production image building and deployment. WHY: Provides convenient commands for rebuilding the production image without container switching and for rebuilding and redeploying to production in a single step. This simplifies common development and deployment workflows. HOW: Introduces new targets in the Makefile that execute `prod-build.sh` and `prod-up.sh` scripts, respectively, or both in sequence for redeployment.
This commit is contained in:
parent
3c34b1f5b5
commit
fd86d91baf
2 changed files with 62 additions and 0 deletions
11
Makefile
11
Makefile
|
|
@ -164,6 +164,17 @@ prod-up: ## 启动生产环境 (使用生产镜像)
|
|||
@echo "$(GREEN)启动生产环境 (linux/amd64)$(RESET)"
|
||||
bash scripts/prod-up.sh
|
||||
|
||||
.PHONY: rebuild
|
||||
rebuild: ## 重建生产镜像(不切换容器)
|
||||
@echo "$(GREEN)重建生产镜像 (linux/amd64)$(RESET)"
|
||||
bash scripts/prod-build.sh
|
||||
|
||||
.PHONY: redeploy
|
||||
redeploy: ## 重建镜像并重新部署(零配置一键发布)
|
||||
@echo "$(GREEN)重建镜像并重新部署到生产环境$(RESET)"
|
||||
bash scripts/prod-build.sh
|
||||
bash scripts/prod-up.sh
|
||||
|
||||
.PHONY: dev-down
|
||||
dev-down: ## 停止开发环境 (保留数据卷)
|
||||
@echo "$(YELLOW)停止开发环境 (Docker)$(RESET)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue