Files
aliyun-manager/Makefile
T

58 lines
1.3 KiB
Makefile
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================
# Makefile - 简化常用操作
# ============================================
.PHONY: help deploy up down restart status logs reload ssl init backup update
help:
@echo "可用命令:"
@echo " make deploy - 首次部署所有服务"
@echo " make up - 启动服务"
@echo " make down - 停止服务"
@echo " make restart - 重启所有服务"
@echo " make status - 查看服务状态"
@echo " make logs - 查看主 Nginx 日志"
@echo " make reload - 重载 Nginx 配置(不重启)"
@echo " make ssl - 配置 SSL 证书"
@echo " make init - 初始化服务器(安装 Docker"
@echo " make backup - 备份配置"
@echo " make update S=xxx - 更新指定服务"
deploy:
./deploy.sh
up:
docker-compose up -d
down:
docker-compose down
restart:
docker-compose restart
status:
docker-compose ps
logs:
docker-compose logs -f nginx
reload:
docker-compose exec nginx nginx -s reload
ssl:
./scripts/setup-ssl.sh
init:
./scripts/init-server.sh
backup:
./scripts/backup.sh
update:
@if [ -z "$(S)" ]; then \
echo "用法: make update S=resume-web"; \
echo "可用服务: resume-web, miniapp-web, resume-api, miniapp-api"; \
exit 1; \
fi
./scripts/update-service.sh $(S)