From a22d68e84533e47e3fe19aa91b7ccc88b4a3147a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=82=98=EB=AF=B8?= Date: Tue, 11 Aug 2026 16:51:47 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20Render=20staging=20=EB=B0=B0=ED=8F=AC?= =?UTF-8?q?=20=EC=8B=A4=ED=8C=A8=20=EB=B3=B5=EA=B5=AC=20=E2=80=94=20Docker?= =?UTF-8?q?file=20=EB=B3=B5=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main에는 원래 Dockerfile이 없었다(dev 전용 파일로 취급해 트렁크 기반 전환 콘텐츠 정합화 때 옮기지 않음). 하지만 Render staging 서비스는 실제로 이 Dockerfile로 이미지를 빌드하고 있었고 (대시보드 Docker Command는 빌드된 이미지의 실행 커맨드만 오버라이드), dev 브랜치 삭제 이후 Render의 배포 브랜치가 main으로 바뀌면서 Dockerfile을 찾지 못해 빌드가 실패했다 (error: failed to read dockerfile: open Dockerfile: no such file or directory). dev의 마지막 버전(OTel agent 제거된 버전) 그대로 복원. --- Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..07dd2c8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +# --- Build stage --- +FROM gradle:8.2.1-jdk11 AS build +WORKDIR /app + +COPY build.gradle settings.gradle ./ +COPY gradle ./gradle +COPY gradlew ./ + +COPY src ./src + +# 로컬/모니터링 검증용 application.yml은 build context 루트에 두고 복사한다. +# (CI/CD에서는 GitHub Secret으로 별도 생성 — 이 Dockerfile은 로컬 검증 전용) +COPY application.yml ./application.yml + +RUN ./gradlew bootJar -x test --no-daemon + +# --- Run stage --- +FROM eclipse-temurin:11-jre +WORKDIR /app + +COPY --from=build /app/build/libs/*.jar app.jar +COPY --from=build /app/application.yml application.yml + +EXPOSE 8080 + +# dev(Render Free tier, 512MB)는 메모리 여유가 없어 OTel agent를 뺀다. +# prod는 CD가 이 Dockerfile을 쓰지 않으므로(별도 CodeDeploy) 영향 없음. +ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul", "-jar", "app.jar", "--spring.config.location=file:./application.yml"]