-
Notifications
You must be signed in to change notification settings - Fork 10
chore: Postgres 연결 테스트용 docker-compose 추가 및 .env.template 수정 #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 제가 내일아침에 테스트해보겠습니다아...! 이 PR과는 번외인 이야기이지만 Postgres 부분의 지원이 잘되면, #180 의 내용중에 json을 활용하는 부분이 대체될 수 있을것 같네요!
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❗ 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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/postgresThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 감사합니다!!
#️⃣ Issue Number
📝 요약(Summary)
💬 To Reviewers (선택)
PR Checklist
reference) How to Code Review