feat: 添加完整的部署支持

- 后端多环境配置(dev, prod)
- Docker 部署支持(Dockerfile, docker-compose.yml)
- Java 部署脚本(deploy.sh)
- 前端构建脚本(build.sh,支持自定义后端地址)
- 健康检查接口(/api/health)
- 完整的部署文档(docs/DEPLOYMENT.md)
- 前端环境变量支持(VITE_API_URL, VITE_WS_URL)
This commit is contained in:
WrBug
2025-12-03 02:48:02 +08:00
parent 220afd748f
commit 59722d7311
14 changed files with 1047 additions and 47 deletions
@@ -0,0 +1,26 @@
package com.wrbug.polymarketbot.controller
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import java.util.*
/**
* 健康检查控制器
* 用于 Docker 健康检查和监控
*/
@RestController
@RequestMapping("/api/health")
class HealthController {
@GetMapping
fun health(): ResponseEntity<Map<String, Any>> {
return ResponseEntity.ok(mapOf(
"status" to "UP",
"timestamp" to System.currentTimeMillis(),
"service" to "polymarket-bot-backend"
))
}
}