KIM-JINO5 1578631f38 feat: dev cutover to production domains преди 2 седмици
..
README.md 1578631f38 feat: dev cutover to production domains преди 2 седмици

README.md

Frontend Config Templates

.env.production 의 환경별 양식. Jenkins Secret File 로 업로드되어 빌드 시점에 주입됩니다.

디렉토리 구조

config-templates/
├── dev/                            (CTL-Window-Server / antooza.com — dev 서버 운영 도메인)
│   └── .env.production.template
└── prod/                           (PROD-Window-Server / antooza.com)
    └── .env.production.template

Secret File 등록

Manage Jenkins → Credentials → (global) → Add Credentials → Kind: Secret file:

환경 credentialsId 사용 파일 Jenkinsfile
dev DEV-ANTOOZA-FRONTEND-ENV dev/.env.production.template 채워서 Frontend/Jenkinsfile
prod PROD-ANTOOZA-FRONTEND-ENV prod/.env.production.template 채워서 Frontend/Jenkinsfile.prod

빌드 시 흐름

  1. withCredentials([file(credentialsId: '...', variable: 'CFG')])
  2. copy /Y "%CFG%" .env.production
  3. npm run buildNEXT_PUBLIC_* 는 빌드 시 클라이언트 번들에 inline
  4. Deploy 단계에서 .env.production 을 배포 경로에도 복사 — 서버 사이드 (API_URL, SIGNALR_CHAT_URL 등) 가 런타임에 로드됨
    • dev : F:\IIS\ANTOOZA\Front\
    • prod: C:\workspace\IIS\Front\

도메인 (dev·prod 공통)

dev 서버를 운영 도메인으로 사용 — dev- 접두사 제거(2026-07-11). dev/prod 값 동일.

NEXT_PUBLIC_SITE_URL https://antooza.com
NEXT_PUBLIC_API_URL / API_URL https://api.antooza.com
NEXT_PUBLIC_RESOURCE_URL https://resource.antooza.com
NEXT_PUBLIC_EMBED_DOMAIN antooza.com
SIGNALR_CHAT_URL / SIGNALR_APP_URL https://api.antooza.com/hubs/{chat,app}

보안 노트

  • 실제 .env.production / .env.development.gitignore.env* 룰로 무시 (커밋 금지)
  • Secret File 업로드 후 Jenkins UI에서 다운로드 불가, 빌드 로그에 자동 마스킹