Some checks failed
continuous-integration/drone/push Build was killed
- 更新Dockerfile - 整合数据库SQL文件为martial_db.sql - 添加docker-compose.yml - 清理临时SQL脚本 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
649 B
Docker
25 lines
649 B
Docker
# 运行阶段:使用轻量级 JRE 镜像
|
|
FROM eclipse-temurin:17-jre-jammy
|
|
|
|
LABEL maintainer="JohnSion"
|
|
LABEL description="武术比赛管理系统后端服务"
|
|
|
|
WORKDIR /app
|
|
|
|
# 复制编译好的 JAR 文件
|
|
COPY target/blade-api.jar /app/blade-api.jar
|
|
|
|
# 暴露端口
|
|
EXPOSE 8123
|
|
|
|
# 健康检查
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=60s --retries=3 \
|
|
CMD curl -f http://localhost:8123/actuator/health || exit 1
|
|
|
|
# JVM 参数配置
|
|
ENV JAVA_OPTS="-Xms512m -Xmx1024m -XX:+UseG1GC"
|
|
ENV SPRING_PROFILE="dev"
|
|
|
|
# 启动命令
|
|
CMD ["sh", "-c", "java ${JAVA_OPTS} -jar /app/blade-api.jar --spring.profiles.active=${SPRING_PROFILE}"]
|