Skip to content

# chore(docker): app profile 풀스택 컨테이너 실행 추가 + Prometheus scrape 경로 전환 - #15

Merged
NewEgoDoc merged 1 commit into
mainfrom
chore/docker-app-profile-fullstack
May 9, 2026
Merged

# chore(docker): app profile 풀스택 컨테이너 실행 추가 + Prometheus scrape 경로 전환#15
NewEgoDoc merged 1 commit into
mainfrom
chore/docker-app-profile-fullstack

Conversation

@NewEgoDoc

Copy link
Copy Markdown
Owner

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

  • 단일 Dockerfile 기반 멀티 모듈 컨테이너 빌드 추가
  • docker-compose app profile로 4개 앱 컨테이너 기동 추가
  • WireMock healthcheck false-negative 이슈 수정
  • Prometheus scrape 대상을 컨테이너 직접 scrape로 전환
  • 실행/관측성 README 가이드 업데이트

How to Test

# 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

### 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
@NewEgoDoc
NewEgoDoc merged commit f09ea2b into main May 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant