From 6c11c953c28e2234a0581ebb85d873eff6f32ebd Mon Sep 17 00:00:00 2001 From: Hyoseong Jo Date: Sun, 11 Jan 2026 23:02:47 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20Docker=20=EB=B9=8C=EB=93=9C=20=EC=8B=9C?= =?UTF-8?q?=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20export=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 빌드 시점에 .env를 export하여 Nuxt runtimeConfig에 반영 - 빈 줄 필터링 추가 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 151ce67..ceaacca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN npm ci COPY . . # 운영 환경변수로 빌드 COPY .env.prod .env -RUN npm run build +RUN export $(grep -v '^#' .env | grep -v '^$' | xargs) && npm run build FROM node:22-alpine WORKDIR /app @@ -43,4 +43,4 @@ USER nuxt EXPOSE 2026 # .env 로드 후 실행 -CMD ["sh", "-c", "export $(grep -v '^#' .env | xargs) && node .output/server/index.mjs"] +CMD ["sh", "-c", "export $(grep -v '^#' .env | grep -v '^$' | xargs) && node .output/server/index.mjs"]