Skip to content
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

Config: 도커로 실행되는 mysql에서 데이터를 마운트시키도록 수정 #124

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ dist-ssr
.env*
.flaskenv*
!.env.project
!.env.vault
!.env.vault
tmp
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
- --collation-server=utf8mb4_unicode_ci
volumes:
- ./sqls:/docker-entrypoint-initdb.d
- ./tmp:/var/lib/mysql
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이제 기존의 /var/lib/mysql 경로에서 실행되던 mysql이 ./tmp:/var/lib/mysql이 경로로 옮겨지는건가요??
아니면, /var/lib/mysql에서 실행되는 mysql이 에러가 발생하면 ./tmp:/var/lib/mysql이 경로의 mysql이 실행되는건가요??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./tmp:/var/lib/mysql 명령어가 로컬 디렉토리의 ./tmp 디렉토리와 컨테이너의 /var/lib/mysql 디렉토리를 연결시키는거라고 할 수 있어요

mysql 이미지의 /var/lib/mysql 디렉토리는 mysql 을 구성하는데 필요한 파일들과 DB 데이터를 저장하는 디렉토리에요
그렇기에 마운트를 시키면 도커 컨테이너의 해당 디렉토리에 발생하는 문제를 내 로컬 디렉토리를 확인해서 파악하고 문제를 수정할 수 있어요

해당 PR을 머지하는건 나중 회의때 만나서 얘기해보고 합치도록해요!


networks:
mysql_db: