Files
goalfylearning-admin/start.sh

30 lines
568 B
Bash
Executable File
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.

#!/bin/bash
# GoalfyMax Admin 启动脚本
echo "启动 GoalfyMax Admin..."
# 检查Go环境
if ! command -v go &> /dev/null; then
echo "错误: 未找到Go环境请先安装Go 1.25+"
exit 1
fi
# 检查配置文件
if [ ! -f "etc/config.yaml" ]; then
echo "错误: 配置文件 etc/config.yaml 不存在"
exit 1
fi
# 下载依赖
echo "下载依赖..."
go mod download
# 构建项目
echo "构建项目..."
go build -o bin/goalfymax-admin cmd/server/main.go
# 启动服务
echo "启动服务..."
./bin/goalfymax-admin -config etc/config.yaml