https 접속 허용
This commit is contained in:
+5
-6
@@ -2,12 +2,9 @@
|
||||
FROM node:20-alpine AS builder
|
||||
WORKDIR /app
|
||||
|
||||
# 의존성 레이어 캐시 (package*.json 변경 시만 재설치)
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
|
||||
# 소스 복사 후 프로덕션 빌드
|
||||
# Docker 환경에서 /api 는 nginx 가 backend:8080 으로 프록시하므로 그대로 사용
|
||||
COPY . .
|
||||
ARG VITE_API_BASE_URL=/api
|
||||
ARG VITE_APP_VERSION=
|
||||
@@ -18,11 +15,13 @@ RUN npm run build
|
||||
# ── 2단계: 서비스 ─────────────────────────────────────────────────────────────
|
||||
FROM nginx:1.27-alpine AS production
|
||||
|
||||
# 빌드 결과물 복사
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# SPA 라우팅 + 정적 파일 캐시 설정
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY nginx-locations.inc /etc/nginx/gc-locations.inc
|
||||
COPY nginx-https.conf /etc/nginx/nginx-https.conf
|
||||
COPY docker-entrypoint.d/40-enable-https.sh /docker-entrypoint.d/40-enable-https.sh
|
||||
RUN chmod +x /docker-entrypoint.d/40-enable-https.sh
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 80 443
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user