Files
backend/start.sh
lan 432c47d969 chore: Update database configuration and enhance error handling
- Changed database credentials in start.sh for testing purposes.
- Added environment variable for testing and allowed origins in start.sh.
- Improved error handling in yggdrasil_auth_service.go by checking for nil user before returning an error.
2025-12-04 22:35:03 +08:00

43 lines
1009 B
Bash
Executable File

#!/bin/bash
# CarrotSkin 服务器启动脚本
# 设置环境变量
export DATABASE_HOST=192.168.10.205
export DATABASE_PORT=5432
export DATABASE_USERNAME=test
export DATABASE_PASSWORD=eFjAbSWJNDFe8NQz
export DATABASE_NAME=test
export DATABASE_SSL_MODE=disable
export DATABASE_TIMEZONE=Asia/Shanghai
export REDIS_HOST=192.168.10.205
export REDIS_PORT=6379
export REDIS_PASSWORD=redis_6zXNXs
export REDIS_DATABASE=0
export JWT_SECRET=your-secret-key-change-this-in-production
export JWT_EXPIRE_HOURS=168
export RUSTFS_ENDPOINT=192.168.10.205:9000
export RUSTFS_ACCESS_KEY=WSQByPs6aXDMcgL8ioTl
export RUSTFS_SECRET_KEY=PKNCHhBbYUkpGMm0EXL87sJ2wuaxlcfORgSQyqIV
export RUSTFS_BUCKET_TEXTURES=test
export RUSTFS_BUCKET_AVATARS=test
export RUSTFS_USE_SSL=false
export EMAIL_ENABLED=false
export Environment=test
export SECURITY_ALLOWED_ORIGINS=*
export LOG_LEVEL=info
export LOG_FORMAT=json
export LOG_OUTPUT=logs/app.log
# 启动服务器
echo "正在启动 CarrotSkin 服务器..."
go run ./cmd/server