# chore(docker): app profile 풀스택 컨테이너 실행 추가 + Prometheus scrape 경로 전환 - #15
Merged
Conversation
### Summary
`docker compose --profile app up -d --build` 한 번으로 4개 앱(`remittance-api`, `payout-worker`, `webhook-dispatcher`, `reconciler`)까지 기동할 수 있도록 풀스택 컨테이너 실행 구성을 추가했습니다.
동시에 Prometheus scrape 대상을 `host.docker.internal`에서 앱 컨테이너 직접 scrape 방식으로 전환하고, README에 개발 모드/풀스택 모드 실행 가이드를 정리했습니다.
---
### Changes
#### 1) Docker 컨테이너 빌드/실행 기반 추가
- `Dockerfile` (신규)
- 단일 Dockerfile + `ARG MODULE`로 4개 모듈 공통 이미지 빌드
- Spring Boot Layered JAR(`dependencies/spring-boot-loader/snapshot-dependencies/application`) 분리 COPY
- runtime `HEALTHCHECK` (`/actuator/health`) 추가
- `.dockerignore` (신규)
- build context 최소화 (`docs`, `docker`, `mock-*`, `.git` 등 제외)
#### 2) docker-compose 풀스택 app profile 추가
- `docker-compose.yml`
- `remittance-api`, `payout-worker`, `webhook-dispatcher`, `reconciler` 서비스 추가 (`profiles: ["app"]`)
- 각 앱 컨테이너 내부 포트 `8080` 통일 + 호스트 포트만 분리
- `8080:8080`, `8081:8080`, `8082:8080`, `8084:8080`
- 앱별 DB/Kafka/Redis/외부 mock URL 환경변수 주입
- WireMock healthcheck를 `wget --spider`(HEAD)에서 `wget -O /dev/null`(GET) 방식으로 변경
#### 3) Prometheus scrape 대상 전환
- `docker/prometheus.yml`
- scrape target을 호스트 기반에서 컨테이너 DNS 기반으로 변경
- `remittance-api:8080`
- `payout-worker:8080`
- `webhook-dispatcher:8080`
- `reconciler:8080`
- 중복 수집(동일 인스턴스 host-published 경로 재수집) 회피 목적 주석 추가
#### 4) 애플리케이션 설정 보강
- `remittance-api/src/main/resources/application.yaml`
- `payout-worker/src/main/resources/application.yaml`
- `webhook-dispatcher/src/main/resources/application.yaml`
- `reconciler/src/main/resources/application.yaml`
- container 환경 주입(`SERVER_PORT`, `DB_URL` 등) 기반 실행에 맞춘 설정 정리
#### 5) 문서 업데이트
- `README.md`
- 실행 모드 분리:
- 개발 모드(인프라만)
- 풀스택 모드(`--profile app`)
- E2E 검증 절차/헬스체크/관측성 설명 업데이트
- Layered JAR + `ARG MODULE` 컨테이너 전략 설명 추가
---
### Checklist
- [x] 단일 Dockerfile 기반 멀티 모듈 컨테이너 빌드 추가
- [x] docker-compose `app` profile로 4개 앱 컨테이너 기동 추가
- [x] WireMock healthcheck false-negative 이슈 수정
- [x] Prometheus scrape 대상을 컨테이너 직접 scrape로 전환
- [x] 실행/관측성 README 가이드 업데이트
---
### How to Test
```bash
# 1) 풀스택 기동
docker compose --profile app up -d --build
# 2) 앱 헬스 확인
for p in 8080 8081 8082 8084; do curl -fsS http://localhost:$p/actuator/health; echo; done
# 3) Prometheus 타겟 확인
curl -s http://localhost:9090/api/v1/targets | jq '.data.activeTargets[] | {scrapeUrl: .scrapeUrl, health: .health}'
# 4) Debezium connector 상태 확인
curl -sS http://localhost:8083/connectors/openremit-outbox/status | jq
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker compose --profile app up -d --build한 번으로 4개 앱(remittance-api,payout-worker,webhook-dispatcher,reconciler)까지 기동할 수 있도록 풀스택 컨테이너 실행 구성을 추가했습니다. 동시에 Prometheus scrape 대상을host.docker.internal에서 앱 컨테이너 직접 scrape 방식으로 전환하고, README에 개발 모드/풀스택 모드 실행 가이드를 정리했습니다.Changes
1) Docker 컨테이너 빌드/실행 기반 추가
Dockerfile(신규)ARG MODULE로 4개 모듈 공통 이미지 빌드dependencies/spring-boot-loader/snapshot-dependencies/application) 분리 COPYHEALTHCHECK(/actuator/health) 추가.dockerignore(신규)docs,docker,mock-*,.git등 제외)2) docker-compose 풀스택 app profile 추가
docker-compose.ymlremittance-api,payout-worker,webhook-dispatcher,reconciler서비스 추가 (profiles: ["app"])8080통일 + 호스트 포트만 분리8080:8080,8081:8080,8082:8080,8084:8080wget --spider(HEAD)에서wget -O /dev/null(GET) 방식으로 변경3) Prometheus scrape 대상 전환
docker/prometheus.ymlremittance-api:8080payout-worker:8080webhook-dispatcher:8080reconciler:80804) 애플리케이션 설정 보강
remittance-api/src/main/resources/application.yamlpayout-worker/src/main/resources/application.yamlwebhook-dispatcher/src/main/resources/application.yamlreconciler/src/main/resources/application.yamlSERVER_PORT,DB_URL등) 기반 실행에 맞춘 설정 정리5) 문서 업데이트
README.md--profile app)ARG MODULE컨테이너 전략 설명 추가Checklist
appprofile로 4개 앱 컨테이너 기동 추가How to Test