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

[BSVR-25] docker-compose 추가 #7

Closed
wants to merge 2 commits into from
Closed

[BSVR-25] docker-compose 추가 #7

wants to merge 2 commits into from

Conversation

wjdwnsdnjs13
Copy link
Member

📌 개요 (필수)

  • server와 DB docker compose 추가!
    • server는 ubuntu 20.04
    • mysql은 8.x 버전

🔨 작업 사항 (필수)

  • docker-compose.yml 추가

@wjdwnsdnjs13 wjdwnsdnjs13 added the 🛠 Setting 개발 환경 세팅 label Jul 1, 2024
@wjdwnsdnjs13 wjdwnsdnjs13 self-assigned this Jul 1, 2024
@github-actions github-actions bot added the size/S label Jul 1, 2024
Copy link
Collaborator

@EunjiShin EunjiShin left a comment

Choose a reason for hiding this comment

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

고생했어! 궁금한 점 몇 가지 코멘트 남겨뒀어~ 👍

++ 실행 어떻게 하는지 wiki에 페이지 생성해서 가이드 작성해주면 좋을 것 같아! 클라분들이 로컬에서 돌릴 때 필요하니까~

Copy link
Collaborator

Choose a reason for hiding this comment

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

spring boot 도커파일 (java -jar 명령어 등)이 따로 없는데 이거 실행 잘 돌아가?
그냥 우분투 서버만 올라가고, 스프링은 실행 안 될 것 같아!

Copy link
Member Author

Choose a reason for hiding this comment

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

spring 실행이랑 다른 스크립트?는 아예 작성 안 했어
지금 우분투 서버만 올라게 되있는 건 맞아

java -jar SPOT-server-0.0.1.jar 이런식으로라두 써둘까??

Copy link
Collaborator

Choose a reason for hiding this comment

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

혹시 도커 파일은 언제 작업할 계획이야? 지라 상으로는 compose 세팅만 있고 도커 파일 세팅은 없어서!
spring 어플리케이션을 실행하려는 목적이라서 지금처럼 docker-compose만 있으면 안 될 것 같아~~

Copy link
Member Author

Choose a reason for hiding this comment

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

아 도커 컴포즈도 첨이긴 했는데 도커 파일은 한 번도 안 해봐서... 음 내일 좀 더 찾아보고 해봐도 괜찮을까...?

Copy link
Collaborator

Choose a reason for hiding this comment

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

웅 도커 파일 추가하고 스프링 도커로 실행 되는 것까지 해서 언제까지 될지 일정 알려줘~ 지라 티켓 기한도 수정해주고!

Copy link
Collaborator

Choose a reason for hiding this comment

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

이 PR은 draft 상태로 바꾸고, 작업 완료 되면 그때 다시 리뷰 상태로 바꾸면 될 듯 해~ 💪

Copy link
Member Author

Choose a reason for hiding this comment

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

오키오키!

Comment on lines +21 to +22
ports:
- 80:80 # 80번 - 80번 매칭
Copy link
Collaborator

Choose a reason for hiding this comment

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

80번 포트를 쓰는 이유가 혹시 있을까? 기본은 8080으로 알고있어서!

Copy link
Member Author

Choose a reason for hiding this comment

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

어 음... 80번 포트로 하면 URL 접속할 때 편해서 계속 그렇게 썼어서 저렇게 했어..ㅎㅎ

Copy link
Collaborator

Choose a reason for hiding this comment

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

스프링은 80에서 띄우려면 root 계정을 사용해야한다고 알고있어!
특별한 이유가 없다면 8080을 쓰는 것 어때?

Copy link
Member Author

Choose a reason for hiding this comment

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

아 오키오키! 바꿔둘게

Comment on lines +9 to +10
volumes:
- ./db/mysql/data:/var/lib/mysql # 기존 데이터 파일과 격리를 위해 db/mysql/data 로 설정함!
Copy link
Collaborator

Choose a reason for hiding this comment

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

기존 데이터 파일 << 이 혹시 어떤 파일이야?

Copy link
Member Author

Choose a reason for hiding this comment

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

기존 데이터 파일 << 이 혹시 어떤 파일이야?

정확하게 기억나진 않는데, MySQL을 이미 사용하고 있으면
./mysql 에 원래 사용하던 데이터가 들어갔던 거로 기억해서 혹시나해서 분리하는 게 좋지 않을까? 저렇게 뒀어

Copy link
Collaborator

Choose a reason for hiding this comment

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

컨테이너 볼륨이 실제 로컬 MySQL 저장소랑 겹치지 않게 사용했다는 의미인거지?
근데 ./mysql이면 현재 경로 (SPOT-server 루트) 내부에 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.

음 주석은 조금 수정하는 게 좋긴 하겠다..ㅎㅎ

command:
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_unicode_ci'
environment:
Copy link
Collaborator

Choose a reason for hiding this comment

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

타임존 세팅도 추가하면 좋을 듯!

Comment on lines +15 to +17
MYSQL_DATABASE: spot # DB 이름 선정 시 변경 예정.
MYSQL_USER: test1234 # 임시 유저
MYSQL_PASSWORD: test1234 # 임시 비밀번호
Copy link
Collaborator

Choose a reason for hiding this comment

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

DB 컨테이너는 NCP 세팅 전까지 로컬 개발용으로 쓸거라서 따로 환경변수로 안뽑은거 맞을까~?

Copy link
Member Author

Choose a reason for hiding this comment

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

DB 컨테이너는 NCP 세팅 전까지 로컬 개발용으로 쓸거라서 따로 환경변수로 안뽑은거 맞을까~?

응응 어차피 임시용인데, 그것도 환경변수로 뺄 필요가 있을까? 싶었어!

@wjdwnsdnjs13 wjdwnsdnjs13 marked this pull request as draft July 1, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Setting 개발 환경 세팅 size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants