chore: Postgres 연결 테스트용 docker-compose 추가 및 .env.template 수정#186
Merged
ParkGyeongTae merged 2 commits intomasterfrom Oct 5, 2025
Merged
chore: Postgres 연결 테스트용 docker-compose 추가 및 .env.template 수정#186ParkGyeongTae merged 2 commits intomasterfrom
ParkGyeongTae merged 2 commits intomasterfrom
Conversation
ehddnr301
requested changes
Oct 5, 2025
docker/docker-compose-postgres.yml
Outdated
| LANG: en_US.utf8 | ||
| volumes: | ||
| - postgres_data:/var/lib/postgresql/data | ||
| - ./postgres/init:/docker-entrypoint-initdb.d/init.sql |
Collaborator
There was a problem hiding this comment.
❗ docker compose -f docker-compose-postgres.yml up 명령어로 실행했을때 init.sql 이 적용되지 않는것으로 확인됩니다.
실행하면 psql:/docker-entrypoint-initdb.d/init.sql: error: could not read from input file: Is a directory 이런 로그가 출력되는데
- ./postgres/init:/docker-entrypoint-initdb.d 이렇게 수정되어야 하지않을까 생각이 듭니다아!
- 아래 명령어로 실제
lang2sql데이터베이스가 생성되지 않았음을 확인했습니다.
docker exec -it postgres bash
psql -U root -d postgres
\l
Contributor
Author
There was a problem hiding this comment.
@ehddnr301
수정 후 아래 방법으로 수정 확인했습니다~! 감사합니다!
# 1. 기존 볼륨 삭제
docker volume rm docker_postgres_data
# 2. 도커 컴포즈 실행
docker compose -f docker-compose-postgres.yml up
# 3. 데이터베이스 확인
docker exec -it postgres psql -U postgres -l
Name | Owner | Encoding | Collate | Ctype | ICU Locale | Locale Provider | Access privileges
-----------+----------+----------+------------+------------+------------+-----------------+-----------------------
lang2sql | postgres | UTF8 | en_US.utf8 | en_US.utf8 | | libc | =Tc/postgres +
| | | | | | | postgres=CTc/postgres+
| | | | | | | lang2sql=CTc/postgres
postgres | postgres | UTF8 | en_US.utf8 | en_US.utf8 | | libc |
template0 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | | libc | =c/postgres +
| | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.utf8 | en_US.utf8 | | libc | =c/postgres +
| | | | | | | postgres=CTc/postgres
test | postgres | UTF8 | en_US.utf8 | en_US.utf8 | | libc | =Tc/postgres +
| | | | | | | postgres=CTc/postgres+
| | | | | | | test=CTc/postgres
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.
#️⃣ Issue Number
📝 요약(Summary)
💬 To Reviewers (선택)
PR Checklist
reference) How to Code Review