서비스별 데이터베이스 환경 변수 적용 #64
Open
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.
📌 변경 내용 요약
POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD)를각 서비스 전용 환경 변수(
DB_USER_NAME,DB_USER_USER,DB_USER_PASSWORD)로 분리했습니다.모든 서비스가 같은 DB(
mydatabase)를 공유하던 문제를 해결했습니다.🔗 관련 이슈
💡 주요 변경 사항
config/settings.py에서 서비스별 DB 환경 변수로 변경POSTGRES_DB→DB_USER_NAMEPOSTGRES_USER→DB_USER_USERPOSTGRES_PASSWORD→DB_USER_PASSWORD🧩 리뷰어 참고 사항
.env파일의 값이 변경되었으므로, 로컬 환경에서 테스트 시.env를 새로 적용해야 합니다.mydatabase)는 더 이상 사용하지 않으며, 각 서비스별 신규 DB가 생성됩니다.docker exec user python manage.py migrate✅ 테스트 방법
각 서비스가 올바른 데이터베이스에 연결되는지 확인:
Nickname check API 테스트: