Open
Conversation
DRF (2) + JWT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Learning Summary
도커 이미지를 빌드하는 방법을 배웠다.
🔑 Key
settings를 개발 환경용과 프로덕션 환경용으로 분리하며 폴더 안에 넣었는데, BASE_DIR에 parent를 추가하지 않아 참조 에러가 발생했다. 디렉토리 구조를 변경할 때는 영향을 미치는 것이 없는지 코드를 한 번 더 점검하자.
📒 Reference
버전 호환
라이브러리 버전과 python 버전이 맞지 않아 에러가 발생했다. 운영진께 여쭤보니 라이브러리 버전을 일일이 하나씩 낮춰보며 맞는 것을 찾아보라 하셨다. 그러나 더 자세히 찾아보니 라이브러리가 더 높은 python 버전을 요구하여 발생한 에러였다. 도커 이미지의 python 버전을 3.8.3에서 3.11로 수정하여 해결했다. aae7dd4
데이터베이스 연결
데이터베이스 연결 단계에서 자꾸만 에러가 발생했다.
첫 번째는 db 컨테이너가 완성되기 전 web 컨테이너에서 연결을 시도하여 발생한 에러였다. db 컨테이너가 준비되었을 경우에만 마이그레이션 및 서버 실행하도록 web 컨테이너에 로직을 추가하여 해결했다. acef941
두 번째는 데이터베이스 계정 인증이 되지 않는 에러였다. 계정을 생성하지 않고 로그인을 시도한 것이 원인이었다. db 컨테이너에 계정 생성 로직을 추가하여 해결했다. 07ce265
🔎 Result
✍🏻 Review
세션을 따라가는 데에 급급하여 모든 코드를 명확히 이해하지 못한 것이 아쉽다. 다시 공부해야겠다.