From 204023422976997dcb416846ada5067987d557a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=A1=EB=8C=80=EC=9D=BC?= Date: Thu, 11 Jun 2026 13:06:17 +0900 Subject: [PATCH] =?UTF-8?q?WSL=20=EB=8F=84=EC=BB=A4=20=EC=A0=84=ED=99=98?= =?UTF-8?q?=EA=B3=BC=20trixie-slim=20=EB=A1=9C=EC=BB=AC=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=20=EB=B3=B5=EA=B5=AC=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- baron-sso/.env.sample | 1 + baron-sso/adminfront/Dockerfile | 4 +- baron-sso/backend/Dockerfile | 6 +- baron-sso/compose.ory.yaml | 6 +- baron-sso/devfront/Dockerfile | 4 +- baron-sso/docker-compose.yaml | 4 +- baron-sso/docker/ory/clickhouse/init.sql | 2 +- .../docs/baronsso_docker_container_roles.md | 78 +++++++++ .../docs/baronsso_work_timeline_report.md | 158 +++++++++++++++++- baron-sso/gateway/Dockerfile | 6 +- baron-sso/orgfront/Dockerfile | 4 +- baron-sso/userfront/Dockerfile | 10 +- baron-sso/userfront/nginx.conf | 4 +- 13 files changed, 264 insertions(+), 23 deletions(-) create mode 100644 baron-sso/docs/baronsso_docker_container_roles.md diff --git a/baron-sso/.env.sample b/baron-sso/.env.sample index 0a59e1f..1de4a7b 100644 --- a/baron-sso/.env.sample +++ b/baron-sso/.env.sample @@ -17,6 +17,7 @@ BACKEND_PORT=3000 ADMINFRONT_PORT=5173 DEVFRONT_PORT=5174 USERFRONT_PORT=5000 +USERFRONT_BUILD_TARGET=production # --- Database Credentials (PostgreSQL) --- DB_USER=baron diff --git a/baron-sso/adminfront/Dockerfile b/baron-sso/adminfront/Dockerfile index 305e302..e712689 100644 --- a/baron-sso/adminfront/Dockerfile +++ b/baron-sso/adminfront/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts AS build +FROM node:24-trixie-slim AS build WORKDIR /workspace @@ -25,7 +25,7 @@ RUN pnpm install --frozen-lockfile --ignore-scripts WORKDIR /workspace/adminfront RUN npm run build -FROM node:24-alpine AS production +FROM node:24-trixie-slim AS production WORKDIR /app ENV NODE_ENV=production diff --git a/baron-sso/backend/Dockerfile b/baron-sso/backend/Dockerfile index e72ea15..dd4716c 100644 --- a/baron-sso/backend/Dockerfile +++ b/baron-sso/backend/Dockerfile @@ -1,9 +1,11 @@ -FROM golang:1.26.2-alpine +FROM golang:1.26.2-trixie WORKDIR /app # Install git for go mod download if needed -RUN apk add --no-cache git +RUN apt-get update \ + && apt-get install -y --no-install-recommends git ca-certificates \ + && rm -rf /var/lib/apt/lists/* # Pre-copy go.mod/sum to cache dependencies COPY go.mod go.sum ./ diff --git a/baron-sso/compose.ory.yaml b/baron-sso/compose.ory.yaml index d0348f6..1a6f5ec 100644 --- a/baron-sso/compose.ory.yaml +++ b/baron-sso/compose.ory.yaml @@ -135,7 +135,7 @@ services: # --- Oathkeeper --- oathkeeper_logs_init: - image: alpine:latest + image: debian:trixie-slim command: [ "sh", @@ -199,11 +199,11 @@ services: # --- 초기화 & 헬스체크 --- ory_stack_check: - image: alpine:latest + image: debian:trixie-slim container_name: ory_stack_check command: > /bin/sh -c " - apk add --no-cache curl; + apt-get update >/dev/null && apt-get install -y --no-install-recommends curl >/dev/null; echo 'Wait for services...'; check_ready() { name=\"$$1\"; diff --git a/baron-sso/devfront/Dockerfile b/baron-sso/devfront/Dockerfile index 32d7cde..b023bbb 100644 --- a/baron-sso/devfront/Dockerfile +++ b/baron-sso/devfront/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts AS build +FROM node:24-trixie-slim AS build WORKDIR /workspace @@ -23,7 +23,7 @@ RUN pnpm install --frozen-lockfile --ignore-scripts WORKDIR /workspace/devfront RUN npm run build -FROM node:24-alpine AS production +FROM node:24-trixie-slim AS production WORKDIR /app ENV NODE_ENV=production diff --git a/baron-sso/docker-compose.yaml b/baron-sso/docker-compose.yaml index a3e9cf6..393c5e4 100644 --- a/baron-sso/docker-compose.yaml +++ b/baron-sso/docker-compose.yaml @@ -180,8 +180,8 @@ services: # In a real unified stack, we might include infra here or use external links. # Here we attach to the same network. infra_check: - image: alpine - command: ["echo", "Infrastructure assumed running"] + image: debian:trixie-slim + command: ["sh", "-lc", "echo Infrastructure assumed running"] networks: - baron_net diff --git a/baron-sso/docker/ory/clickhouse/init.sql b/baron-sso/docker/ory/clickhouse/init.sql index 0d46e86..bae3359 100644 --- a/baron-sso/docker/ory/clickhouse/init.sql +++ b/baron-sso/docker/ory/clickhouse/init.sql @@ -29,4 +29,4 @@ CREATE TABLE IF NOT EXISTS ory.oathkeeper_access_logs ( raw String DEFAULT '' ) ENGINE = MergeTree() ORDER BY (timestamp, request_id) -TTL timestamp + INTERVAL 30 DAY; +TTL toDateTime(timestamp) + INTERVAL 30 DAY; diff --git a/baron-sso/docs/baronsso_docker_container_roles.md b/baron-sso/docs/baronsso_docker_container_roles.md new file mode 100644 index 0000000..be2f7d9 --- /dev/null +++ b/baron-sso/docs/baronsso_docker_container_roles.md @@ -0,0 +1,78 @@ +# Baron SSO Docker 컨테이너 역할 요약 + +본 문서는 Docker Desktop 화면에 보이는 Baron SSO 관련 컨테이너가 각각 어떤 역할을 하는지 간략히 정리한 문서입니다. + +## 1. 한눈에 보는 구조 + +- `baron_*`: Baron SSO 애플리케이션 본체와 앱 전용 인프라 +- `ory_*`: Ory 기반 인증/인가 스택 +- `*-migrate-*`, `init-rp-*`, `*_check`, `*_init`: 초기화나 점검만 수행하고 끝나는 일회성 컨테이너 + +## 2. 앱/프론트/백엔드 계열 + +| 컨테이너 | 역할 | 비고 | +| --- | --- | --- | +| `baron_gateway` | 외부 브라우저 진입용 Nginx 게이트웨이 | `5000:5000`, 사용자 요청을 `userfront` 등 내부 서비스로 프록시 | +| `baron_backend` | Baron SSO 백엔드 API 서버 | Go/Fiber 기반, PostgreSQL/ClickHouse/Redis/Ory와 연동 | +| `baron_userfront` | 사용자용 메인 UI | Flutter 기반 사용자 화면 | +| `baron_adminfront` | 관리자용 웹 UI | React/Vite 기반, `5173:5173` | +| `baron_devfront` | 개발자/클라이언트 설정용 웹 UI | React/Vite 기반, `5174:5173` | +| `baron_orgfront` | 조직/시각화용 웹 UI | React/Vite 기반, `5175:5175` | + +## 3. Baron 앱 전용 인프라 + +| 컨테이너 | 역할 | 비고 | +| --- | --- | --- | +| `baron_postgres` | Baron 앱 메인 데이터베이스 | 사용자/운영 데이터 저장, 호스트 포트는 `5433:5432` | +| `baron_clickhouse` | Baron 앱 감사 로그/분석 저장소 | 대용량 이벤트/감사 로그 적재 | +| `baron_redis` | 캐시 및 빠른 상태 저장소 | 세션성 데이터, 캐시, 보조 상태 저장 | +| `infra_check-1` | app stack 기동 전 인프라 존재 여부를 맞추는 더미 컨테이너 | 실제 서비스 로직 없음, compose 의존성 연결용 | + +## 4. Ory 인증/인가 스택 + +| 컨테이너 | 역할 | 비고 | +| --- | --- | --- | +| `ory_postgres` | Ory 전용 PostgreSQL | Kratos/Hydra/Keto 메타데이터 저장 | +| `ory_clickhouse` | Ory/Oathkeeper 로그 저장소 | 접근 로그 및 보안 이벤트 적재 | +| `ory_kratos` | 사용자 인증/계정/셀프서비스 플로우 서버 | 로그인, 회원가입, 복구, 검증 등 담당 | +| `ory_hydra` | OAuth2/OIDC 서버 | 토큰 발급, client 관리, OIDC issuer 역할 | +| `ory_keto` | 권한 관계(authorization) 서버 | relation tuple 기반 권한 모델 처리 | +| `ory_oathkeeper` | 인증 프록시/정책 집행 게이트 | 외부 요청을 규칙에 따라 인증/인가 후 내부 서비스로 전달 | +| `ory_vector` | Oathkeeper/Ory 로그 수집 파이프라인 | 로그를 가공해 ClickHouse로 전달 | + +## 5. 마이그레이션/초기화/헬스체크 컨테이너 + +이 그룹은 계속 떠 있는 서버가 아니라, 시작 시 필요한 작업만 수행하고 종료되는 컨테이너입니다. Docker 화면에서 `Exited (0)`이면 보통 정상 완료로 보면 됩니다. + +| 컨테이너 | 역할 | 비고 | +| --- | --- | --- | +| `kratos-migrate-1` | Kratos DB 스키마 마이그레이션 | Ory Postgres 준비 후 실행 | +| `hydra-migrate-1` | Hydra DB 스키마 마이그레이션 | Ory Postgres 준비 후 실행 | +| `keto-migrate-1` | Keto DB 스키마 마이그레이션 | Ory Postgres 준비 후 실행 | +| `oathkeeper_logs_i...` | Oathkeeper 로그 디렉터리 초기화 | 로그 폴더 생성 및 권한 설정 | +| `ory_stack_check` | Ory 핵심 서비스 readiness 검사 | Kratos/Hydra/Keto 준비 완료 확인 | +| `init-rp-1` | Hydra OAuth client 자동 등록 | `adminfront`, `devfront`, `orgfront`, `oathkeeper-introspect` 생성 | + +## 6. 화면을 볼 때 해석 방법 + +- 초록 점으로 계속 실행 중인 컨테이너: 실제 서비스를 제공하는 서버일 가능성이 큼 +- 시작 버튼 모양 또는 `Exited (0)` 상태 컨테이너: 초기화/마이그레이션/체크 작업이 끝난 것일 가능성이 큼 +- `baron_gateway`가 unhealthy이면 대개 뒤쪽 `baron_userfront` 또는 업스트림 서비스가 아직 준비되지 않았는지 먼저 확인하면 됨 + +## 7. 접속 기준 주소 + +- 사용자 메인 진입: `http://localhost:5000` +- 관리자 화면: `http://localhost:5173` +- 개발자 화면: `http://localhost:5174` +- 조직 화면: `http://localhost:5175` +- Oathkeeper 프록시 포트: `http://localhost:4457` + +## 8. 요약 + +이 Docker 화면은 크게 세 층으로 보면 됩니다. + +- Baron 앱 계층: `baron_backend`, `baron_userfront`, `baron_adminfront`, `baron_devfront`, `baron_orgfront`, `baron_gateway` +- Baron/Ory 인프라 계층: `baron_postgres`, `baron_clickhouse`, `baron_redis`, `ory_postgres`, `ory_clickhouse` +- 인증/인가 계층: `ory_kratos`, `ory_hydra`, `ory_keto`, `ory_oathkeeper`, `ory_vector` + +즉, 사용자는 `baron_gateway`로 들어오고, 실제 인증은 Ory stack이 담당하며, Baron 앱은 그 위에서 비즈니스 기능과 관리 화면을 제공하는 구조입니다. \ No newline at end of file diff --git a/baron-sso/docs/baronsso_work_timeline_report.md b/baron-sso/docs/baronsso_work_timeline_report.md index c3d0d68..2662d76 100644 --- a/baron-sso/docs/baronsso_work_timeline_report.md +++ b/baron-sso/docs/baronsso_work_timeline_report.md @@ -515,9 +515,150 @@ #### 해결/결론 - Baron SSO 로컬 실행 스택이 브라우저 접속 가능한 상태까지 도달함 +--- + +### 단계 14. Docker Desktop 제거 후 WSL Docker 환경 재점검 + +#### 사용자 지시 +- 기존 Docker Desktop을 제거하고 WSL에 Docker를 설치했으니 다시 작업을 이어가 달라는 요청 + +#### 수행한 작업 +- Windows PowerShell과 WSL Ubuntu 양쪽에서 Docker CLI/엔진 상태를 재확인함 +- 기존 Baron SSO 관련 컨테이너, 네트워크, 볼륨 존재 여부를 점검함 +- 저장소 내부 `.env`, 생성된 auth config, compose 파일은 그대로 유지되는지 확인함 + +#### 확인 결과 +- Windows PowerShell 기준으로는 `docker`가 PATH에 없어 직접 실행되지 않았음 +- WSL Ubuntu 내부에는 `/usr/bin/docker`가 존재했고 Docker 엔진도 정상 응답했음 +- 다만 새 WSL Docker 엔진에는 기존 Baron SSO 컨테이너/네트워크가 남아 있지 않았음 +- 저장소 내부의 `.env`, `config/.generated/auth-config.env`, 렌더된 Ory 설정 파일은 유지되고 있었음 + +#### 문제점 +- 런타임 리소스는 초기화되었지만 저장소 설정 파일은 남아 있어, 환경 자체를 다시 만드는 것이 아니라 WSL 엔진 기준으로 stack만 재기동해야 하는 상태였음 + +#### 확인 방법 +- PowerShell과 WSL에서 각각 Docker 명령 실행 가능 여부 확인 +- `docker ps -a`, `docker network ls`로 기존 리소스 상태 점검 + +#### 해결/결론 +- 이후 작업은 Windows Docker Desktop 기준이 아니라 WSL Ubuntu 내부 Docker 엔진 기준으로 진행하기로 정리함 + +--- + +### 단계 15. Debian trixie-slim 기반 이미지 정책 반영 + +#### 사용자 지시 +- Docker를 Debian trixie (slim) 베이스 이미지 기반으로 맞출 수 있는 부분은 반영해 달라는 요청 + +#### 수행한 작업 +- 저장소 내 커스텀 이미지 Dockerfile과 helper 서비스 이미지를 검토함 +- 외부 공식 이미지와 저장소 내부에서 직접 빌드하는 이미지를 구분해 수정 범위를 정함 +- backend, gateway, adminfront, devfront, orgfront, userfront 및 일부 helper 컨테이너를 trixie/trixie-slim 기반으로 조정함 +- userfront의 기본 빌드 타깃을 production으로 사용하도록 `.env.sample` 정책도 맞춤 + +#### 확인 결과 +- 다음 커스텀 이미지들은 Debian trixie 또는 trixie-slim 기반으로 전환 가능했음 + - `backend/Dockerfile` + - `gateway/Dockerfile` + - `adminfront/Dockerfile` + - `devfront/Dockerfile` + - `orgfront/Dockerfile` + - `userfront/Dockerfile` +- helper 서비스도 다음과 같이 조정함 + - `compose.ory.yaml`의 `oathkeeper_logs_init`, `ory_stack_check` + - `docker-compose.yaml`의 `infra_check` +- 반면 다음 외부 공식 이미지는 저장소 안에서 베이스 OS를 직접 통제할 수 없었음 + - `postgres` + - `redis` + - `clickhouse/clickhouse-server` + - `oryd/*` + - `ghcr.io/cirruslabs/flutter` + +#### 문제점 +- Alpine 전용 패키지 설치 명령과 Nginx 설정 경로를 Debian 계열에 맞게 바꿔야 했음 +- userfront의 기존 Brotli 설정은 Debian 패키지 nginx 기본 구성과 맞지 않았음 + +#### 확인 방법 +- 관련 Dockerfile 및 compose 설정 검토 +- `docker compose config`와 실제 이미지 빌드로 변경 타당성 확인 + +#### 해결 +- Alpine 기반 `apk` 사용 구문을 `apt-get` 기반으로 변경 +- Debian nginx 경로에 맞게 userfront 설정 파일 복사 위치를 `/etc/nginx/conf.d/default.conf`로 조정 +- `userfront/nginx.conf`에서 Debian 기본 nginx와 맞지 않는 Brotli 설정 제거 +- healthcheck에 필요한 도구를 포함할 수 있도록 Debian 패키지 설치 구성 정리 + +#### 검증 결과 +- WSL Docker 기준으로 커스텀 이미지 빌드 성공 확인 +- 주요 빌드 대상: + - `baron-sso-backend` + - `baron-sso-gateway` + - `baron-sso-adminfront` + - `baron-sso-devfront` + - `baron-sso-orgfront` + - `baron-sso-userfront` + +#### 해결/결론 +- 저장소 내부에서 제어 가능한 범위에 대해서는 Debian trixie-slim 정책을 반영했고, 외부 공식 이미지는 예외로 유지함 + +--- + +### 단계 16. WSL Docker 기준 전체 stack 복구 및 최종 정상화 + +#### 사용자 지시 +- trixie-slim 반영 이후 실제 기동까지 계속 진행해 달라는 요청 + +#### 수행한 작업 +- WSL Docker 엔진에 Baron SSO 외부 네트워크를 재생성함 +- infra + Ory stack, app stack을 WSL 기준으로 다시 기동함 +- 기동 중 실패 컨테이너 로그와 health 상태를 점검하고 문제를 국소 수정함 + +#### 확인 결과 +- 초기 재기동 시 `ory_clickhouse`가 시작 직후 종료됨 +- `baron_userfront`, `baron_gateway`는 실제 응답은 가능했지만 healthcheck가 `unhealthy` 상태였음 +- 원인 분석 결과: + - `docker/ory/clickhouse/init.sql`의 TTL 식이 ClickHouse 24.6에서 `DateTime64(3)`와 호환되지 않았음 + - Debian 기반으로 바뀐 `gateway`, `userfront` 이미지에는 healthcheck가 사용하는 `wget`이 빠져 있었음 + +#### 문제점 +- Ory 로그 저장소 초기화 SQL이 새 ClickHouse 버전 제약과 맞지 않아 Ory용 ClickHouse가 안정적으로 올라오지 못했음 +- gateway/userfront는 서비스 자체는 떠 있었지만 healthcheck 도구 부재 때문에 compose 상에서 비정상으로 표시됐음 + +#### 확인 방법 +- `docker logs ory_clickhouse` +- `docker inspect baron_gateway`, `docker inspect baron_userfront` +- `Invoke-WebRequest http://localhost:5000` +- WSL 기준 `docker ps` 상태 확인 + +#### 해결 +- `docker/ory/clickhouse/init.sql`의 TTL 식을 `TTL toDateTime(timestamp) + INTERVAL 30 DAY`로 수정 +- `gateway/Dockerfile`, `userfront/Dockerfile`에 `wget` 설치를 추가 +- 수정된 이미지/서비스만 다시 빌드 및 재기동하여 영향 범위를 최소화함 + +#### 검증 결과 +- 최종 컨테이너 상태 확인: + - `baron_gateway` healthy + - `baron_userfront` healthy + - `baron_backend` healthy + - `ory_clickhouse` running + - `ory_hydra`, `ory_keto`, `ory_kratos`, `ory_oathkeeper`, `ory_vector` 정상 실행 +- HTTP 응답 코드 확인 결과 + - `http://localhost:5000` -> `200` + - `http://localhost:5173` -> `200` + - `http://localhost:5174` -> `200` + - `http://localhost:5175` -> `200` + +#### 추가 확인 내용 +- `http://localhost:4457/health/alive`는 `404`를 반환했으며, 이는 public proxy 포트가 일반 앱 health endpoint를 그대로 노출하는 용도가 아님을 보여줌 +- Baron/Ory 주요 서비스는 WSL Docker 기준으로 다시 정상화됨 + +#### 해결/결론 +- WSL Docker와 Debian trixie-slim 반영 이후에도 Baron SSO 로컬 실행 스택을 다시 브라우저 접속 가능한 상태까지 복구 완료함 + ## 4. 현재까지 생성/변경된 주요 파일 - `docs/baronsso_structure_analysis.md` +- `docs/baronsso_docker_container_roles.md` - `.env` - `config/.generated/auth-config.env` - `config/.generated/ory/kratos/kratos.yml` @@ -529,6 +670,14 @@ - `compose.ory.yaml` - `docker-compose.yaml` - `.env.sample` +- `backend/Dockerfile` +- `gateway/Dockerfile` +- `adminfront/Dockerfile` +- `devfront/Dockerfile` +- `orgfront/Dockerfile` +- `userfront/Dockerfile` +- `userfront/nginx.conf` +- `docker/ory/clickhouse/init.sql` ## 5. 현재까지 확인된 주요 문제 목록 @@ -549,6 +698,9 @@ - `config/.generated/ory/oathkeeper` 산출물 누락 시 Oathkeeper 시작 실패 - Kratos allowed return URLs 렌더링 값 오류 - Hydra system secret 길이 부족 오류 +- Docker Desktop 제거 후 Windows 기준 `docker` PATH와 WSL Docker 엔진 기준 실행 환경이 분리됨 +- ClickHouse 24.6에서 Ory init SQL의 TTL 식이 `DateTime64(3)`와 호환되지 않았음 +- Debian trixie-slim 전환 후 gateway/userfront healthcheck에 필요한 `wget`이 누락되었음 ### 5.4 현재 남아 있는 참고 사항 - gateway는 userfront가 떠 있기 전에는 unhealthy가 될 수 있음 @@ -570,6 +722,10 @@ - backend DB 포트 오설정 수정 완료 - app stack 기동 완료 - localhost 브라우저 진입 주소 응답 확인 완료 +- WSL Docker 기준 런타임 재기동 및 네트워크 복구 완료 +- Debian trixie-slim 기반 커스텀 이미지 전환 완료 +- ClickHouse TTL 호환성 수정 완료 +- gateway/userfront healthcheck 정상화 완료 ## 7. 현재 미해결 항목 @@ -585,4 +741,4 @@ ## 9. 최종 요약 -이번 작업에서는 Baron SSO 저장소 구조 분석과 문서화에서 출발해, 로컬 `.env` 및 auth config 생성, Docker 네트워크 준비, infra + Ory stack 기동, app stack 기동, 그리고 브라우저 접속 검증까지 순차적으로 완료했습니다. 진행 중 Docker Desktop 재시작 이후 레지스트리 접근 문제는 해소되었고, 이후에는 이미지 태그 호환성 문제, Ory 생성물 누락, Kratos/Hydra 설정 검증 오류, backend DB 포트 오설정 문제가 순차적으로 드러났습니다. 각 문제는 로그와 렌더 결과를 기준으로 원인을 확인한 뒤 태그 조정, 설정 재생성, 환경값 수정, compose 환경변수 보정으로 해결했습니다. 최종적으로 `http://localhost:5000`, `http://localhost:5173`, `http://localhost:5174`, `http://localhost:5175`가 모두 `200` 응답을 반환하는 상태까지 도달했습니다. \ No newline at end of file +이번 작업에서는 Baron SSO 저장소 구조 분석과 문서화에서 출발해, 로컬 `.env` 및 auth config 생성, Docker 네트워크 준비, infra + Ory stack 기동, app stack 기동, 브라우저 접속 검증, 이후 WSL Docker 환경 전환과 Debian trixie-slim 기반 이미지 정책 반영까지 순차적으로 완료했습니다. 진행 중에는 Docker Desktop 재시작 이후 레지스트리 접근 문제, 이미지 태그 호환성 문제, Ory 생성물 누락, Kratos/Hydra 설정 검증 오류, backend DB 포트 오설정, WSL 전환 후 런타임 리소스 재생성, ClickHouse TTL 호환성 문제, gateway/userfront healthcheck 도구 누락 문제가 순차적으로 드러났습니다. 각 문제는 로그, compose 설정, 렌더 결과, 실제 HTTP 응답을 기준으로 원인을 확인한 뒤 태그 조정, 설정 재생성, Dockerfile 수정, compose 환경변수 보정, 국소 재기동으로 해결했습니다. 최종적으로 WSL Docker 기준에서도 `http://localhost:5000`, `http://localhost:5173`, `http://localhost:5174`, `http://localhost:5175`가 모두 `200` 응답을 반환하는 상태까지 복구했습니다. \ No newline at end of file diff --git a/baron-sso/gateway/Dockerfile b/baron-sso/gateway/Dockerfile index a8a57f3..8fa51c1 100644 --- a/baron-sso/gateway/Dockerfile +++ b/baron-sso/gateway/Dockerfile @@ -1,4 +1,8 @@ -FROM nginx:alpine +FROM debian:trixie-slim + +RUN apt-get update \ + && apt-get install -y --no-install-recommends nginx ca-certificates wget \ + && rm -rf /var/lib/apt/lists/* COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/baron-sso/orgfront/Dockerfile b/baron-sso/orgfront/Dockerfile index 706bada..93a4579 100644 --- a/baron-sso/orgfront/Dockerfile +++ b/baron-sso/orgfront/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts AS build +FROM node:24-trixie-slim AS build WORKDIR /workspace @@ -23,7 +23,7 @@ RUN pnpm install --frozen-lockfile --ignore-scripts WORKDIR /workspace/orgfront RUN npm run build -FROM node:24-alpine AS production +FROM node:24-trixie-slim AS production WORKDIR /app ENV NODE_ENV=production diff --git a/baron-sso/userfront/Dockerfile b/baron-sso/userfront/Dockerfile index 3a26c7c..8850063 100644 --- a/baron-sso/userfront/Dockerfile +++ b/baron-sso/userfront/Dockerfile @@ -20,19 +20,21 @@ WORKDIR /app/userfront RUN flutter pub get RUN rm -rf build/web && flutter build web --release --wasm -FROM node:24-alpine AS optimize +FROM node:24-trixie-slim AS optimize WORKDIR /work COPY --from=build /app/userfront/build/web /work/build/web COPY userfront/scripts/optimize-web-build.mjs /work/scripts/optimize-web-build.mjs RUN node /work/scripts/optimize-web-build.mjs /work/build/web # Stage 2: Serve with Nginx -FROM alpine:3.23 AS production -RUN apk add --no-cache nginx nginx-mod-http-brotli +FROM debian:trixie-slim AS production +RUN apt-get update \ + && apt-get install -y --no-install-recommends nginx ca-certificates wget \ + && rm -rf /var/lib/apt/lists/* # Copy built assets COPY --from=optimize /work/build/web /usr/share/nginx/html # Copy custom Nginx config -COPY userfront/nginx.conf /etc/nginx/http.d/default.conf +COPY userfront/nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 5000 CMD ["nginx", "-g", "daemon off;"] diff --git a/baron-sso/userfront/nginx.conf b/baron-sso/userfront/nginx.conf index 4bc2d74..cdd904d 100644 --- a/baron-sso/userfront/nginx.conf +++ b/baron-sso/userfront/nginx.conf @@ -30,9 +30,7 @@ server { application/javascript mjs; } etag on; - brotli off; - brotli_static on; - + error_log /dev/stderr warn; access_log /var/log/nginx/access.log json_combined;