Skip to content

Commit

Permalink
update chapter15
Browse files Browse the repository at this point in the history
  • Loading branch information
gleaming9 committed Nov 14, 2024
1 parent 81aa529 commit d907b85
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ RUN go install github.com/air-verse/air@latest
#개발 서버 자동 시작
CMD ["air"]

## docker-compose down -v <= 실행중인 컨테이너를 멈추고 매핑된 볼륨들을 제거
1 change: 1 addition & 0 deletions _chapter15/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ RUN go install github.com/air-verse/air@latest
#개발 서버 자동 시작
CMD ["air"]

## docker-compose down -v <= 실행중인 컨테이너를 멈추고 매핑된 볼륨들을 제거
2 changes: 1 addition & 1 deletion _chapter15/main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package _chapter15

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion _chapter15/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package _chapter15

import (
"context"
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ services:
build:
#빌드할 파일들이 있는 위치를 지정 : .. <- 한칸 위 폴더에 go.mod 위치
#go_todo_app 폴더를 컨텍스트로 설정
context: ..
dockerfile: _chapter15/Dockerfile
context: .
dockerfile: Dockerfile
# target=dev로 설정하여 Dockerfile의 dev stage를 빌드
args:
target: dev

# 로컬 컴퓨터의 파일과 컨테이너 안의 파일을 연결, 코드 수정 시 바로 컨테이너에 반영
volumes:
- ../:/app # go_todo_app 루트 디렉터리를 컨테이너의 /app에 마운트
- .:/app # go_todo_app 루트 디렉터리를 컨테이너의 /app에 마운트

# 컨테이너가 사용할 포트를 지정
ports:
Expand Down

0 comments on commit d907b85

Please sign in to comment.