|
|
hai 1 mes | |
|---|---|---|
| .. | ||
| README.md | hai 1 mes | |
.env.production 의 환경별 양식. Jenkins Secret File 로 업로드되어 빌드 시점에 주입됩니다.
config-templates/
├── dev/ (CTL-Window-Server / dev.dpot.live)
│ └── .env.production.template
└── prod/ (PROD-Window-Server / dpot.live)
└── .env.production.template
Manage Jenkins → Credentials → (global) → Add Credentials → Kind: Secret file:
| 환경 | credentialsId | 사용 파일 | Jenkinsfile |
|---|---|---|---|
| dev | DEV-DPOT-FRONTEND-ENV |
dev/.env.production.template 채워서 |
Frontend/Jenkinsfile |
| prod | PROD-DPOT-FRONTEND-ENV |
prod/.env.production.template 채워서 |
Frontend/Jenkinsfile.prod |
withCredentials([file(credentialsId: '...', variable: 'CFG')])copy /Y "%CFG%" .env.productionnpm run build — NEXT_PUBLIC_* 는 빌드 시 클라이언트 번들에 inline.env.production 을 배포 경로에도 복사 — 서버 사이드 (API_URL, SIGNALR_CHAT_URL 등) 가 런타임에 로드됨
F:\IIS\DPOT\Front\C:\workspace\IIS\Front\| 키 | dev | prod |
|---|---|---|
NEXT_PUBLIC_SITE_URL |
https://dev.dpot.live |
https://dpot.live |
NEXT_PUBLIC_API_URL / API_URL |
https://dev-api.dpot.live |
https://api.dpot.live |
NEXT_PUBLIC_RESOURCE_URL |
https://dev-resource.dpot.live |
https://resource.dpot.live |
NEXT_PUBLIC_EMBED_DOMAIN |
dev.dpot.live |
dpot.live |
SIGNALR_CHAT_URL / SIGNALR_APP_URL |
https://dev-api.dpot.live/hubs/{chat,app} |
https://api.dpot.live/hubs/{chat,app} |
.env.production / .env.development 는 .gitignore 의 .env* 룰로 무시 (커밋 금지)