-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from limbs713/limbs713
[19기_임형준] Docker & API 리팩토링 미션 제출합니다.
- Loading branch information
Showing
4 changed files
with
191 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: "3" | ||
services: # 이 항목 밑에 실행하려는 컨테이너 들을 정의 ( 컴포즈에서 컨테이너 : 서비스 ) | ||
db: # 서비스 명 | ||
image: mysql:latest # 사용할 이미지 | ||
restart: always | ||
container_name: ceos # 컨테이너 이름 설정 | ||
ports: | ||
- "3307:3306" # 접근 포트 설정 | ||
environment: # -e 옵션 | ||
- MYSQL_DATABASE=ceos | ||
- MYSQL_ROOT_PASSWORD= "root" # MYSQL 패스워드 설정 옵션 | ||
- TZ=Asia/Seoul | ||
volumes: | ||
- /Users/Shared/data/mysql-dev:/var/lib/mysql # -v 옵션 (다렉토리 마운트 설정) | ||
web: | ||
container_name: spring-everytime | ||
build: src/main/java | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- db | ||
environment: | ||
mysql_host: db | ||
restart: always | ||
|
||
volumes: | ||
dbdata: | ||
app: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM openjdk:18 | ||
ARG JAR_FILE=/build/libs/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
LABEL authors="imhyeongun" | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java","-jar","/app.jar"] |
This file contains 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