-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# docker-compose.yml | ||
|
||
services: | ||
mysql: | ||
container_name: SPOT-db | ||
image: mysql:8 # 선호하는 버전 있을 경우 선정 예정! | ||
ports: | ||
- 3306:3306 # 혹시나 기존에 MySQL 사용 중일 경우 앞자리를 다른 포트로 바꿔야함. | ||
volumes: | ||
- ./db/mysql/data:/var/lib/mysql # 기존 데이터 파일과 격리를 위해 db/mysql/data 로 설정함! | ||
Comment on lines
+9
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 기존 데이터 파일 << 이 혹시 어떤 파일이야? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
정확하게 기억나진 않는데, MySQL을 이미 사용하고 있으면 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 컨테이너 볼륨이 실제 로컬 MySQL 저장소랑 겹치지 않게 사용했다는 의미인거지? (볼륨 구조에 이견이 있는건 아닌데, 주석이 조금 이해가 안되어서 코멘트 남긴다! 변경할 필요는 없어~~) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 음 주석은 조금 수정하는 게 좋긴 하겠다..ㅎㅎ |
||
command: | ||
- '--character-set-server=utf8mb4' | ||
- '--collation-server=utf8mb4_unicode_ci' | ||
environment: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 타임존 세팅도 추가하면 좋을 듯! |
||
MYSQL_DATABASE: spot # DB 이름 선정 시 변경 예정. | ||
MYSQL_USER: test1234 # 임시 유저 | ||
MYSQL_PASSWORD: test1234 # 임시 비밀번호 | ||
Comment on lines
+15
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. DB 컨테이너는 NCP 세팅 전까지 로컬 개발용으로 쓸거라서 따로 환경변수로 안뽑은거 맞을까~? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
응응 어차피 임시용인데, 그것도 환경변수로 뺄 필요가 있을까? 싶었어! |
||
server: | ||
container_name: SPOT-server | ||
image: ubuntu:20.04 | ||
ports: | ||
- 80:80 # 80번 - 80번 매칭 | ||
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 80번 포트를 쓰는 이유가 혹시 있을까? 기본은 8080으로 알고있어서! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 어 음... 80번 포트로 하면 URL 접속할 때 편해서 계속 그렇게 썼어서 저렇게 했어..ㅎㅎ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 스프링은 80에서 띄우려면 root 계정을 사용해야한다고 알고있어! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 오키오키! 바꿔둘게 |
||
volumes: | ||
- ./app:./app |
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.
spring boot 도커파일 (java -jar 명령어 등)이 따로 없는데 이거 실행 잘 돌아가?
그냥 우분투 서버만 올라가고, 스프링은 실행 안 될 것 같아!
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.
spring 실행이랑 다른 스크립트?는 아예 작성 안 했어
지금 우분투 서버만 올라게 되있는 건 맞아
java -jar SPOT-server-0.0.1.jar 이런식으로라두 써둘까??
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.
혹시 도커 파일은 언제 작업할 계획이야? 지라 상으로는 compose 세팅만 있고 도커 파일 세팅은 없어서!
spring 어플리케이션을 실행하려는 목적이라서 지금처럼 docker-compose만 있으면 안 될 것 같아~~
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.
아 도커 컴포즈도 첨이긴 했는데 도커 파일은 한 번도 안 해봐서... 음 내일 좀 더 찾아보고 해봐도 괜찮을까...?
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.
웅 도커 파일 추가하고 스프링 도커로 실행 되는 것까지 해서 언제까지 될지 일정 알려줘~ 지라 티켓 기한도 수정해주고!
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은 draft 상태로 바꾸고, 작업 완료 되면 그때 다시 리뷰 상태로 바꾸면 될 듯 해~ 💪
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.
오키오키!