JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
박효준
박효준
JSTL 날짜 Format
경매형 이벤트 상품 firebase
마켓몰 GA4
마켓몰 직원가 적용 프로세스
페이레터 결제 승인 대사
미적재건 엑셀 추출
경매형 이벤트 상품 FO
페이레터 대사 내역
GPC BO Front
이미지 편집
골핑 블랙골프데이 본행사 (2022 PC ver.)
Firebase hosting
골핑 검색 최적화
이웃 BO
골핑 nginx 관련
Docker
골핑 Nginx 전환
More
Share
Explore
골핑 Nginx 전환
As is → To be
apache + tomcat → nginx
포트 |
8020, 8023
폴더 |
/app/mobileGolping
As-is 방식
구버전 젠킨스
m_emer_01~08: 골핑 모바일
[배포 방식]
Golping-MobileVuejs의 master 브랜치에서 npm run generate 명령어로 빌드
빌드된 결과물을 Golping-MobileVuejsServer 의 front-배포 브랜치로 복사
# vuejs 복사.bat
rd
/s/q C:\LEGACY\golping-mobile-vuejsserver\src\main\webapp\_nuxt
md
C:\LEGACY\golping-mobile-vuejsserver\src\main\webapp\_nuxt
xcopy
/Y/S C:\LEGACY\golping-mobilevuejs\dist\_nuxt\* C:\LEGACY\golping-mobile-vuejsserver\src\main\webapp\_nuxt
3. 커밋 & 푸시
4. 구젠킨스 배포 (.war 파일로 빌드→.war 파일 실행)
To-be 방식
신버전 젠킨스
GOP-FRONTVUE-PROD
Dockerfile-prod
#(1) BUILDPHASE
# -1. 파일 복사, yarn install
# -2. yarn generate
#(2) NGINX
# -1. nginx-prod.conf 복사, BUILDPHASE 결과물 복사
# -2. health.jsp 파일 생성
# -3. nginx -g daemon off;
docker-compose-prod.yml
deploy
:
replicas
:
8
# 8개 서버
placement
:
max_replicas_per_node
:
1
constraints
:
[
node.hostname
!=
VLGR
-
GDGPWASSTG
]
...
ports
:
-
"8040:80"
-
"8043:443"
...
nginx.conf
location
/
mypage
/
order {}
if
(
$query_string ~
^
mdrec$
)
{}
location
/
best100GoodList {}
location
/
ep
/
{}
location
/
res
/
{}
location
/
common
/
js
/
{}
=> 아파치 conf/extra/httpd-ssl.conf
배포 진행 상황
http://172.20.140.176:9180/view/GOP-%EC%9A%B4%EC%98%81/job/01-GOP-FRONTVUE-PROD/
[2023/09/07]
#1), #2) 실패 → nginx.conf에 세미콜론 누락
#3) 실패 → WAS03에 /app/nginx 폴더 없음
#5) 실패 → 배포 중 docker context 사용
[2023/09/14]
#7) 실패 → replicas는 정상으로 뜨고, 로그에 에러 발생 X하나 도메인 접속 불가
추가 확인할 부분
mobile api로 완전히 이관되었는지 확인 (/enc)
WAS05에만 배포 시도
REST_URL_HTTPS
"https://mgol.spazon.com/rest"
BASE_URL_HTTPS
"https://mgol.spazon.com"
→ 네이버페이에서 /rest/enc가 아닌 /enc로 호출되어 405 Method Not Allowed 발생
axios
.
post
(
process
.
env
.
BASE_URL_HTTP
+
"/enc"
,
p
)
...
axios
.
post
(
process
.
env
.
REST_URL_HTTP
+
"/enc"
,
p
)
→ /rest/naver/reserve에서 500번대 에러 발생
/rest/naver/reserve API 확인해보니
com
.
golfzon
.
commerce
.
inf
.
InterfaceException
:
https
:
/
/
dev
.
apis
.
naver
.
com
/
golfzone
-
mall
/
naverpay
/
payments
/
v1
/
reserve
interface
failedjava
.
io
.
IOException
:
Server
returned
HTTP
response code
:
401
for
URL
:
https
:
/
/
dev
.
apis
.
naver
.
com
/
golfzone
-
mall
/
naverpay
/
payments
/
v1
/
reserve
at
com
.
golfzon
.
commerce
.
inf
.
NaverPayInf
.
getNaverApiURL
(
NaverPayInf
.
java
:
299
)
at
com
.
golfzon
.
commerce
.
inf
.
NaverPayInf
.
getNaverJSON
(
NaverPayInf
.
java
:
209
)
at
com
.
golfzon
.
commerce
.
inf
.
NaverPayInf
.
reserveReqProc
(
NaverPayInf
.
java
:
89
)
at
com
.
golfzon
.
commerce
.
order
.
NaverPayRestApi
.
naverReserve
(
NaverPayRestApi
.
java
:
78
)
at java
.
base
/
jdk
.
internal
.
reflect
.
NativeMethodAccessorImpl
.
invoke0
(
Native
Method
)
at java
.
base
/
jdk
.
internal
.
reflect
.
NativeMethodAccessorImpl
.
invoke
(
NativeMethodAccessorImpl
.
java
:
62
)
at java
.
base
/
jdk
.
internal
.
reflect
.
DelegatingMethodAccessorImpl
.
invoke
(
DelegatingMethodAccessorImpl
.
java
:
43
)
at java
.
base
/
java
.
lang
.
reflect
.
Method
.
invoke
(
Method
.
java
:
566
)
at
org
.
springframework
.
web
.
method
.
support
.
InvocableHandlerMethod
.
doInvoke
(
InvocableHandlerMethod
.
java
:
205
)
at
org
.
springframework
.
web
.
method
.
support
.
InvocableHandlerMethod
.
invokeForRequest
(
InvocableHandlerMethod
.
java
:
150
)
at
org
.
springframework
.
web
.
servlet
.
mvc
.
method
.
annotation
.
ServletInvocableHandlerMethod
.
invokeAndHandle
(
ServletInvocableHandlerMethod
.
java
:
117
)
at
org
.
springframework
.
web
.
servlet
.
mvc
.
method
.
annotation
.
RequestMappingHandlerAdapter
.
invokeHandlerMethod
(
RequestMappingHandlerAdapter
.
java
:
895
)
at
org
.
springframework
.
web
.
servlet
.
mvc
.
method
.
annotation
.
RequestMappingHandlerAdapter
.
handleInternal
(
RequestMappingHandlerAdapter
.
java
:
808
)
at
org
.
springframework
.
web
.
servlet
.
mvc
.
method
.
AbstractHandlerMethodAdapter
.
handle
(
AbstractHandlerMethodAdapter
.
java
:
87
)
at
org
.
springframework
.
web
.
servlet
.
DispatcherServlet
.
doDispatch
(
DispatcherServlet
.
java
:
1067
)
at
org
.
springframework
.
web
.
servlet
.
DispatcherServlet
.
doService
(
DispatcherServlet
.
java
:
963
)
at
org
.
springframework
.
web
.
servlet
.
FrameworkServlet
.
processRequest
(
FrameworkServlet
.
java
:
1006
)
at
org
.
springframework
.
web
.
servlet
.
FrameworkServlet
.
doPost
(
FrameworkServlet
.
java
:
909
)
https://dev.apis.naver.com/golfzone-mall/naverpay/payments/v1/reserve
여기에서 401 error 리턴
As is → To be
As-is 방식
To-be 방식
배포 진행 상황
추가 확인할 부분
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.