- /health + /ready 엔드포인트 추가 (DB/Redis 상태 확인) - RequestID 미들웨어 + 구조화 JSON 로깅 - 체인 트랜잭션 per-user rate limit (20 req/min) - DB 커넥션 풀 설정 (MaxOpen 25, MaxIdle 10, MaxLifetime 5m) - Graceful Shutdown 시 Redis/MySQL 연결 정리 - Dockerfile HEALTHCHECK 추가 - CI에 go vet + 빌드 검증 단계 추가 (deploy 전 실행) - 보스 레이드 클라이언트 입장 API (JWT 인증) - Player 프로필 모듈 추가 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
20 lines
545 B
Docker
20 lines
545 B
Docker
# Stage 1: Build
|
|
FROM golang:alpine AS builder
|
|
WORKDIR /build
|
|
COPY tolchain/ ./tolchain/
|
|
COPY a301_server/ ./a301_server/
|
|
WORKDIR /build/a301_server
|
|
RUN go mod download
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -o server .
|
|
|
|
# Stage 2: Run
|
|
FROM alpine:latest
|
|
RUN apk --no-cache add tzdata ca-certificates curl
|
|
RUN mkdir -p /data/game
|
|
WORKDIR /app
|
|
COPY --from=builder /build/a301_server/server .
|
|
EXPOSE 8080
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD curl -f http://localhost:8080/health || exit 1
|
|
CMD ["./server"]
|