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)"
|
@echo "$(GREEN)启动生产环境 (linux/amd64)$(RESET)"
|
||||||
bash scripts/prod-up.sh
|
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
|
.PHONY: dev-down
|
||||||
dev-down: ## 停止开发环境 (保留数据卷)
|
dev-down: ## 停止开发环境 (保留数据卷)
|
||||||
@echo "$(YELLOW)停止开发环境 (Docker)$(RESET)"
|
@echo "$(YELLOW)停止开发环境 (Docker)$(RESET)"
|
||||||
|
|
|
||||||
51
src/vite-env.d.ts
vendored
51
src/vite-env.d.ts
vendored
|
|
@ -1 +1,52 @@
|
||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
// Asset module declarations for TypeScript
|
||||||
|
declare module '*.png' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.jpg' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.jpeg' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.gif' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.webp' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.avif' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
// Uppercase extensions (e.g., IMG_6702.JPG)
|
||||||
|
declare module '*.PNG' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.JPG' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.JPEG' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.GIF' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.WEBP' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
declare module '*.AVIF' {
|
||||||
|
const src: string
|
||||||
|
export default src
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue