Skip to content

Commit

Permalink
🐛 도커 환경에서 파일 경로 못찾는 버그 해결 (#337) (#341)
Browse files Browse the repository at this point in the history
* 🐛 logback 파일 jar 파일 외부로 복사 (#337)

* 🐛 빌드 파일 경로로 수정 (#337)

* 🐛 도커 빌드 artifact로 logback.xml 전달 (#337)

* 🐛 Dockerfile loback.xml 경로 수정 (#337)

* 🐛 logback.xml 경로 build 파일 경로로 수정 (#337)

* 🐛 hashtag_log.log 경로 수정 (#337)

* ♻️ 임시 브랜치 제거

* 🩹 디버깅용 코드 추가
  • Loading branch information
semi-cloud authored Feb 18, 2025
1 parent 65cb2c6 commit 89a6cec
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/dev-batch-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ jobs:
- name: Build with Gradle
run: SPRING_PROFILES_ACTIVE=test ./gradlew :${{ env.MODULE_NAME }}:clean :${{ env.MODULE_NAME }}:build
shell: bash


- name: Debug working directory
run: pwd && ls -al ./${{ env.MODULE_NAME }}/src/main/resources/

- name: Upload build artifact (JAR and Dockerfile)
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: |
./${{ env.MODULE_NAME }}/build/libs/*.jar
./${{ env.MODULE_NAME }}/build/resources/main/logback-spring.xml
./${{ env.MODULE_NAME }}/*.Dockerfile
upload-docker-image:
Expand Down
2 changes: 1 addition & 1 deletion ahachul_secret
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class CommonConstant {
// HASHTAG
const val HASHTAG_REDIS_KEY = "hashtag_rank"
const val LOST_FILE_URL = "/app/ahachul_data/datas/all.json"
const val HASHTAG_FILE_URL = "logs/archive/hashtag/hashtag_log.log"
const val HASHTAG_FILE_URL = "./scheduler/logs/archive/hashtag/hashtag_log.log"
val HASHTAG_LOG_DATETIME_FORMATTER: DateTimeFormatter = DateTimeFormatter.ofPattern("yy-MM-dd HH:mm:ss")
val CURSOR_PAGING_DATETIME_FORMATTER: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS")
}
Expand Down
3 changes: 2 additions & 1 deletion scheduler/app.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ ARG PROFILE
ENV PROFILE=${PROFILE}
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul", "-jar", "app.jar", "--spring.profiles.active=${PROFILE}"]
COPY build/resources/main/logback-spring.xml config/logback-spring.xml
ENTRYPOINT ["java", "-Duser.timezone=Asia/Seoul", "-jar", "app.jar", "--spring.profiles.active=${PROFILE}"]

0 comments on commit 89a6cec

Please sign in to comment.