fix: deployment
This commit is contained in:
parent
5d2c500ff3
commit
cf2765296c
15
deployment/Jenkinsfile
vendored
15
deployment/Jenkinsfile
vendored
@ -7,7 +7,6 @@ def getImageTag() {
|
||||
return dateFormat.format(currentDate)
|
||||
}
|
||||
|
||||
|
||||
podTemplate(
|
||||
label: "${PIPELINE_ID}",
|
||||
serviceAccount: 'jenkins',
|
||||
@ -30,11 +29,23 @@ podTemplate(
|
||||
|
||||
stage("Get Source") {
|
||||
checkout scm
|
||||
|
||||
// 환경변수 파일 확인 및 읽기
|
||||
if (!fileExists('deployment/deploy_env_vars')) {
|
||||
error "deployment/deploy_env_vars 파일이 없습니다!"
|
||||
}
|
||||
|
||||
props = readProperties file: "deployment/deploy_env_vars"
|
||||
namespace = "${props.namespace}"
|
||||
|
||||
// 필수 환경변수 검증
|
||||
if (!props.registry || !props.image_org || !props.namespace) {
|
||||
error "필수 환경변수가 누락되었습니다. registry, image_org, namespace를 확인하세요."
|
||||
}
|
||||
|
||||
echo "Registry: ${props.registry}"
|
||||
echo "Image Org: ${props.image_org}"
|
||||
echo "Namespace: ${namespace}"
|
||||
echo "Image Tag: ${imageTag}"
|
||||
}
|
||||
|
||||
@ -77,6 +88,8 @@ podTemplate(
|
||||
--build-arg REACT_APP_AUTH_URL="${props.auth_url}" \\
|
||||
--build-arg REACT_APP_MEMBER_URL="${props.member_url}" \\
|
||||
--build-arg REACT_APP_STORE_URL="${props.store_url}" \\
|
||||
--build-arg REACT_APP_MENU_URL="${props.menu_url}" \\
|
||||
--build-arg REACT_APP_SALES_URL="${props.sales_url}" \\
|
||||
--build-arg REACT_APP_CONTENT_URL="${props.content_url}" \\
|
||||
--build-arg REACT_APP_RECOMMEND_URL="${props.recommend_url}" \\
|
||||
--build-arg BUILD_FOLDER="deployment/container" \\
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
# ConfigMap
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@ -6,11 +7,13 @@ metadata:
|
||||
data:
|
||||
runtime-env.js: |
|
||||
window.__runtime_config__ = {
|
||||
AUTH_URL: 'http://${ingress_host}/api/auth',
|
||||
MEMBER_URL: 'http://${ingress_host}/api/member',
|
||||
STORE_URL: 'http://${ingress_host}/api/store',
|
||||
CONTENT_URL: 'http://${ingress_host}/api/content',
|
||||
RECOMMEND_URL: 'http://${ingress_host}/api/recommend'
|
||||
AUTH_URL: '${auth_url}',
|
||||
MEMBER_URL: '${member_url}',
|
||||
STORE_URL: '${store_url}',
|
||||
MENU_URL: '${menu_url}',
|
||||
SALES_URL: '${sales_url}',
|
||||
CONTENT_URL: '${content_url}',
|
||||
RECOMMEND_URL: '${recommend_url}'
|
||||
};
|
||||
|
||||
---
|
||||
|
||||
@ -1,34 +1,35 @@
|
||||
# deployment/deploy_env_vars
|
||||
# smarketing-frontend 배포 환경변수 설정
|
||||
# 이 파일을 실제 환경에 맞게 수정하세요
|
||||
|
||||
# Container Registry 설정
|
||||
REGISTRY=acrdigitalgarage02.azurecr.io
|
||||
IMAGE_ORG=smarketing
|
||||
registry=acrdigitalgarage02.azurecr.io
|
||||
image_org=smarketing
|
||||
|
||||
# Kubernetes 설정
|
||||
NAMESPACE=smarketing
|
||||
REPLICAS=1
|
||||
EXPORT_PORT=18080
|
||||
namespace=smarketing
|
||||
replicas=1
|
||||
export_port=18080
|
||||
|
||||
# Gateway/Ingress 설정 (⭐ smarketing-backend와 동일한 IP 사용)
|
||||
INGRESS_HOST=smarketing.20.249.184.228.nip.io
|
||||
ingress_host=smarketing.20.249.184.228.nip.io
|
||||
|
||||
# 리소스 설정
|
||||
RESOURCES_REQUESTS_CPU=256m
|
||||
RESOURCES_REQUESTS_MEMORY=256Mi
|
||||
RESOURCES_LIMITS_CPU=1024m
|
||||
RESOURCES_LIMITS_MEMORY=1024Mi
|
||||
resources_requests_cpu=256m
|
||||
resources_requests_memory=256Mi
|
||||
resources_limits_cpu=1024m
|
||||
resources_limits_memory=1024Mi
|
||||
|
||||
# API URLs (⭐ smarketing-backend ingress를 통해 라우팅)
|
||||
# 현재 설정된 백엔드 API들과 일치
|
||||
AUTH_URL=http://smarketing.20.249.184.228.nip.io/api/auth
|
||||
MEMBER_URL=http://smarketing.20.249.184.228.nip.io/api/member
|
||||
STORE_URL=http://smarketing.20.249.184.228.nip.io/api/store
|
||||
MENU_URL=http://smarketing.20.249.184.228.nip.io/api/menu
|
||||
SALES_URL=http://smarketing.20.249.184.228.nip.io/api/sales
|
||||
CONTENT_URL=http://smarketing.20.249.184.228.nip.io/api/content
|
||||
RECOMMEND_URL=http://smarketing.20.249.184.228.nip.io/api/recommend
|
||||
auth_url=http://smarketing.20.249.184.228.nip.io/api/auth
|
||||
member_url=http://smarketing.20.249.184.228.nip.io/api/member
|
||||
store_url=http://smarketing.20.249.184.228.nip.io/api/store
|
||||
menu_url=http://smarketing.20.249.184.228.nip.io/api/menu
|
||||
sales_url=http://smarketing.20.249.184.228.nip.io/api/sales
|
||||
content_url=http://smarketing.20.249.184.228.nip.io/api/content
|
||||
recommend_url=http://smarketing.20.249.184.228.nip.io/api/recommend
|
||||
|
||||
# GitHub 설정
|
||||
GITHUB_ORG=won-ktds
|
||||
TEAMID=smarketing
|
||||
github_org=won-ktds
|
||||
teamid=smarketing
|
||||
Loading…
x
Reference in New Issue
Block a user