From 6d5062c187224977e7f82de8a4fecde4559ebe7c Mon Sep 17 00:00:00 2001 From: Ginieee Date: Thu, 15 Aug 2024 23:35:29 +0900 Subject: [PATCH 01/64] =?UTF-8?q?fix:=20=EB=A9=94=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=9B=8C=EC=BC=80=EC=9D=B4=EC=85=98/?= =?UTF-8?q?=EB=A6=AC=EB=B7=B0=EC=97=90=20Empty=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/home/RecentReviewSection.tsx | 4 ++++ .../_components/user/home/WktListSection.tsx | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/app/_components/user/home/RecentReviewSection.tsx b/src/app/_components/user/home/RecentReviewSection.tsx index 6a6acb42..a57ac547 100644 --- a/src/app/_components/user/home/RecentReviewSection.tsx +++ b/src/app/_components/user/home/RecentReviewSection.tsx @@ -93,6 +93,10 @@ const RecentReviewSection = () => { ) : ( ) + ) : data.pageInfo.totalElements <= 0 ? ( +
+

최근 후기가 없습니다.

+
) : ( data.reviewInfosForMember.map((review) => ( { const router = useRouter(); @@ -75,12 +75,22 @@ const WktListSection = () => { > {!data ? ( isLoading ? ( - +
+ +
) : isError ? ( - +
+ +
) : ( - +
+ +
) + ) : data.pageInfo.totalElements <= 0 ? ( +
+

모집 중인 워케이션이 없습니다.

+
) : ( data.wktInfos.map((wktInfo) => ( Date: Thu, 15 Aug 2024 23:38:27 +0900 Subject: [PATCH 02/64] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20repl?= =?UTF-8?q?ace=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/user/login/UserLoginSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/_components/user/login/UserLoginSection.tsx b/src/app/_components/user/login/UserLoginSection.tsx index d16a5907..b853fef8 100644 --- a/src/app/_components/user/login/UserLoginSection.tsx +++ b/src/app/_components/user/login/UserLoginSection.tsx @@ -41,7 +41,7 @@ const UserLoginSection = ({ onFindPasswordClick }: UserLoginSectionProps) => { setError(result.error); console.log('로그인 실패 : ', result); } else { - router.refresh(); + router.replace('/'); } }; return ( From 131ee36dd25ee8254a8b127f1fd50f2d6dde3036 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:01:42 +0900 Subject: [PATCH 03/64] =?UTF-8?q?fix:=20=ED=85=8D=EC=8A=A4=ED=8A=B8=20rem?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tailwind.config.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tailwind.config.ts b/tailwind.config.ts index a0ec9665..9fed0521 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -37,15 +37,15 @@ const config: Config = { 'yellow-button-line': '#E5CD07', }, fontSize: { - '1': '20px', - '2': '18px', - '3': '16px', - '4': '14px', - '5': '12px', - '6': '10px', - h1: '42px', - h2: '32px', - h3: '24px', + '1': '1.25rem', + '2': '1.125rem', + '3': '1rem', + '4': '0.875rem', + '5': '0.75rem', + '6': '0.625rem', + h1: '2.625rem', + h2: '2rem', + h3: '1.5rem', }, borderRadius: { regular: '5px', From cd74a0fca9e697f659a590e1d0c046989561e732 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:02:08 +0900 Subject: [PATCH 04/64] =?UTF-8?q?fix:=20=20=EB=84=A4=EB=B9=84=EB=B0=94?= =?UTF-8?q?=EC=97=90=20ml-auto=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/user/common/atoms/UserNavButtonAtom.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/_components/user/common/atoms/UserNavButtonAtom.tsx b/src/app/_components/user/common/atoms/UserNavButtonAtom.tsx index 0a0a5197..f7b7682c 100644 --- a/src/app/_components/user/common/atoms/UserNavButtonAtom.tsx +++ b/src/app/_components/user/common/atoms/UserNavButtonAtom.tsx @@ -25,7 +25,7 @@ const UserNavButtonAtom = () => { if (!session.data) { return ( -
+
{ } return ( -
+
{session.data.isAdmin ? ( router.push('/admin')} // 라우팅 주소 변경 예정 From f7d043b6136037b8e8683862d52127f2f94952a0 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:02:23 +0900 Subject: [PATCH 05/64] =?UTF-8?q?fix:=20=EB=82=B4=EB=B8=8C=EB=B0=94=20?= =?UTF-8?q?=EA=B5=AC=EC=A1=B0=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/containers/UserNavBarContainer.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app/_components/user/common/containers/UserNavBarContainer.tsx b/src/app/_components/user/common/containers/UserNavBarContainer.tsx index 3f721143..13da2e3b 100644 --- a/src/app/_components/user/common/containers/UserNavBarContainer.tsx +++ b/src/app/_components/user/common/containers/UserNavBarContainer.tsx @@ -17,30 +17,30 @@ const UserNavBarContainer = () => { { href: '/mypage', text: '마이페이지' }, ]; return ( -
-
- logo +
+
+ logo
-
+
{menuItems.map((item) => (

{item.text}

From 4f0f6f9dd688fa542a32e52db31df8bf7c048559 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:02:39 +0900 Subject: [PATCH 06/64] =?UTF-8?q?fix:=20=ED=99=94=EB=A9=B4=20=EC=B5=9C?= =?UTF-8?q?=EC=86=8C=20=EC=82=AC=EC=9D=B4=EC=A6=88=20=EC=A0=9C=ED=95=9C=20?= =?UTF-8?q?(1024px)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/layout.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 87222bbb..93bd590a 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,8 +1,10 @@ import type { Metadata } from 'next'; import { Noto_Sans_KR } from 'next/font/google'; import './globals.css'; +import Image from 'next/image'; import ReactQueryProvider from './_hooks/ReactQueryProvider'; import { AuthContext } from './_context/AuthContext'; +import { DkationLogo } from './_assets/icons'; const notoSansKR = Noto_Sans_KR({ subsets: ['latin'] }); @@ -20,7 +22,21 @@ export default function RootLayout({ - {children} + + {/* 1024px 미만일 때만 표시 */} +
+ logo +

+ 본 서비스는 PC 기기를 대상으로 +
제공되고 있습니다. +

+

+ 쾌적한 서비스 이용을 위해 PC 기기에서 접속해주세요. +

+
+ {/* 1024px 이상일 때만 표시 */} +
{children}
+
From 474139079ccaff7ddddbbfed23c6257953d996b5 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:04:21 +0900 Subject: [PATCH 07/64] =?UTF-8?q?fix:=20=EB=82=B4=EB=B8=8C=EB=B0=94=20lg,?= =?UTF-8?q?=20xl=20=EC=97=90=20=EB=94=B0=EB=9D=BC=20px=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/common/containers/UserNavBarContainer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/_components/user/common/containers/UserNavBarContainer.tsx b/src/app/_components/user/common/containers/UserNavBarContainer.tsx index 13da2e3b..6a671a66 100644 --- a/src/app/_components/user/common/containers/UserNavBarContainer.tsx +++ b/src/app/_components/user/common/containers/UserNavBarContainer.tsx @@ -33,8 +33,8 @@ const UserNavBarContainer = () => { className={ (item.href === '/' && currentPath === '/') || (item.href !== '/' && currentPath.startsWith(item.href)) - ? 'px-5 text-center font-semibold' - : 'px-5 text-center' + ? 'px-2 text-center font-semibold xl:px-5' + : 'px-2 text-center xl:px-5' } > {item.text} From f1adc65fe7e6b56d2e99a261abaa563a9498a328 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:08:53 +0900 Subject: [PATCH 08/64] =?UTF-8?q?fix:=20MainHeaderSection=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/home/MainHeaderSection.tsx | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/app/_components/user/home/MainHeaderSection.tsx b/src/app/_components/user/home/MainHeaderSection.tsx index 7ffab693..dd2a95a2 100644 --- a/src/app/_components/user/home/MainHeaderSection.tsx +++ b/src/app/_components/user/home/MainHeaderSection.tsx @@ -8,30 +8,28 @@ import UserButtonAtom from '../common/atoms/UserButtonAtom'; const MainHeaderSection = () => { const router = useRouter(); return ( -
-
-
- home-logo -

- 일과 휴식을 동시에, 조화로움을 찾아서! -

-
-

- 디케이션은 디케이테크인의 사내 워케이션 시스템으로, -
공정한 추첨을 통해 특별한 경험을 제공합니다. +

+
+ home-logo +

+ 일과 휴식을 동시에, 조화로움을 찾아서!

- { - router.push('/workation'); - }} - rightArrow - size="lg" - className="rounded-lg" - buttonStyle="black" - type="button" - />
+

+ 디케이션은 디케이테크인의 사내 워케이션 시스템으로, +
공정한 추첨을 통해 특별한 경험을 제공합니다. +

+ { + router.push('/workation'); + }} + rightArrow + size="lg" + className="rounded-lg" + buttonStyle="black" + type="button" + />
); }; From 6646732f13604debb7432b56e9095f11840d9af9 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:33:29 +0900 Subject: [PATCH 09/64] =?UTF-8?q?fix:=20=EC=9B=8C=EC=BC=80=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EB=AA=A9=EB=A1=9D=20=EC=95=84=EC=9D=B4=ED=85=9C=20?= =?UTF-8?q?=ED=81=AC=EA=B8=B0=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(user)/(with-layout)/workation/page.tsx | 60 +++++++++++-------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/src/app/(route)/(user)/(with-layout)/workation/page.tsx b/src/app/(route)/(user)/(with-layout)/workation/page.tsx index aa41deeb..b7237042 100644 --- a/src/app/(route)/(user)/(with-layout)/workation/page.tsx +++ b/src/app/(route)/(user)/(with-layout)/workation/page.tsx @@ -252,35 +252,45 @@ const Workation = () => {
router.push(`/workation/${wkt.wktId}`)} > - place -
-

{wkt.wktPlaceTitle}

-

- {wkt.title} -

-

- 모집인원 : {wkt.totalRecruit}명 -

-

- 모집 기간 : {dayjs(wkt.applyStartDate).format('YYYY.MM.DD')} -{' '} - {dayjs(wkt.applyEndDate).format('YYYY.MM.DD')} -

-

- 워케이션 기간 : {dayjs(wkt.startDate).format('YYYY.MM.DD')} -{' '} - {dayjs(wkt.endDate).format('YYYY.MM.DD')} -

+
+ place +
+
+

{wkt.wktPlaceTitle}

+

+ {wkt.title} +

+
+
+

+ 모집인원 : {wkt.totalRecruit}명 +

+
+

+ 모집 기간 :
+ {dayjs(wkt.applyStartDate).format('YYYY.MM.DD')} -{' '} + {dayjs(wkt.applyEndDate).format('YYYY.MM.DD')} +

+

+ 워케이션 기간 :
+ {dayjs(wkt.startDate).format('YYYY.MM.DD')} -{' '} + {dayjs(wkt.endDate).format('YYYY.MM.DD')} +

+
+
+
Date: Fri, 16 Aug 2024 00:33:41 +0900 Subject: [PATCH 10/64] =?UTF-8?q?fix:=20=ED=95=84=ED=84=B0=20=EC=BB=A8?= =?UTF-8?q?=ED=85=8C=EC=9D=B4=EB=84=88=EC=97=90=20=EC=B7=A8=EC=86=8C/?= =?UTF-8?q?=ED=99=95=EC=9D=B8=EB=B2=84=ED=8A=BC=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/common/containers/UserFilteringContainer.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/_components/user/common/containers/UserFilteringContainer.tsx b/src/app/_components/user/common/containers/UserFilteringContainer.tsx index f6fd7bca..93b0ad4e 100644 --- a/src/app/_components/user/common/containers/UserFilteringContainer.tsx +++ b/src/app/_components/user/common/containers/UserFilteringContainer.tsx @@ -34,11 +34,6 @@ const UserFilteringContainer = ({ )}
{filterChildren}
-
- {/* 머지 후 버튼 컴포넌트로 대체 필요 */} - - -
); }; From 73c0d0e8f266f8a8672ff6d84d2b865a9ae0d162 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:41:26 +0900 Subject: [PATCH 11/64] =?UTF-8?q?fix:=20=ED=95=84=ED=84=B0=EB=A7=81=20?= =?UTF-8?q?=EC=84=B9=EC=85=98=EC=97=90=20=EB=B0=B0=EA=B2=BD=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserFilteringSectionContainer.tsx | 38 +++++++++++++------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/app/_components/user/common/containers/UserFilteringSectionContainer.tsx b/src/app/_components/user/common/containers/UserFilteringSectionContainer.tsx index ae45bf10..7a59cbc4 100644 --- a/src/app/_components/user/common/containers/UserFilteringSectionContainer.tsx +++ b/src/app/_components/user/common/containers/UserFilteringSectionContainer.tsx @@ -35,13 +35,20 @@ const UserFilteringSectionContainer = ({ onClick={filterOption.onClickFilter} /> {filterOption.isFilterOpen && ( -
- +
-
+
+ +
+ )} )} @@ -49,13 +56,20 @@ const UserFilteringSectionContainer = ({ <> {orderOption.isOrderOpen && ( -
- +
-
+
+ +
+ )} )} From d0c308aca0bff3c66f1a2785f4470aa80c1898ca Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:56:45 +0900 Subject: [PATCH 12/64] =?UTF-8?q?fix:=20=ED=85=8C=EC=9D=B4=EB=B8=94=20isFi?= =?UTF-8?q?rst,=20isLast=20=ED=8C=A8=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/user/common/atoms/UserTableBodyAtom.tsx | 2 +- src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx b/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx index f425dd20..786977b4 100644 --- a/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx +++ b/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx @@ -15,7 +15,7 @@ const UserTableBodyAtom = ({ }: UserTableBodyAtomProps) => { return ( {children} diff --git a/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx b/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx index ba9579a1..87ce9ecf 100644 --- a/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx +++ b/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx @@ -13,7 +13,7 @@ const UserTableHeaderAtom = ({ }: UserTableHeaderAtomProps) => { return ( {text} From d35b213e13cab1fc638b1fdba094c29464d7b8c9 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 00:56:57 +0900 Subject: [PATCH 13/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EB=82=B4=EC=97=AD=20table=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(user)/(with-layout)/points/history/page.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/(route)/(user)/(with-layout)/points/history/page.tsx b/src/app/(route)/(user)/(with-layout)/points/history/page.tsx index 4137307b..249262cb 100644 --- a/src/app/(route)/(user)/(with-layout)/points/history/page.tsx +++ b/src/app/(route)/(user)/(with-layout)/points/history/page.tsx @@ -32,11 +32,11 @@ const PointsHistoryPage = () => {
- + - - - + + + {!data ? ( @@ -55,7 +55,11 @@ const PointsHistoryPage = () => { {(currentPage - 1) * 6 + idx + 1} - {item.pointTitle} + +
+ {item.pointTitle} +
+
{dateConverter(item.getTime)} From ba709cabdd912460aa8f60a29adf08ddcf8bce58 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:05:34 +0900 Subject: [PATCH 14/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A0=95=EC=B1=85=20width=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-layout)/points/policy/page.tsx | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/app/(route)/(user)/(with-layout)/points/policy/page.tsx b/src/app/(route)/(user)/(with-layout)/points/policy/page.tsx index 23ac11fd..8efcfe3b 100644 --- a/src/app/(route)/(user)/(with-layout)/points/policy/page.tsx +++ b/src/app/(route)/(user)/(with-layout)/points/policy/page.tsx @@ -42,12 +42,12 @@ const PointsPolicyPage = () => {

포인트 정책

-
-

번호

+
+

번호

분류

-

점수

-

등록 일시

-

+

점수

+

등록 일시

+

{!policyList ? ( @@ -66,18 +66,22 @@ const PointsPolicyPage = () => {
{ setCurrentOpen(currentOpen === item.id ? null : item.id); }} > -

+

{(currentPage - 1) * 5 + idx + 1}

{item.policyTitle}

-

{item.quantity.toLocaleString()}

-

{dateConverter(item.modifiedAt)}

-
+

+ {item.quantity.toLocaleString()} +

+

+ {dateConverter(item.modifiedAt)} +

+
policy-toggle Date: Fri, 16 Aug 2024 01:05:46 +0900 Subject: [PATCH 15/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=EB=82=B4=EC=97=AD=20width=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/(user)/(with-layout)/points/history/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(route)/(user)/(with-layout)/points/history/page.tsx b/src/app/(route)/(user)/(with-layout)/points/history/page.tsx index 249262cb..36deee25 100644 --- a/src/app/(route)/(user)/(with-layout)/points/history/page.tsx +++ b/src/app/(route)/(user)/(with-layout)/points/history/page.tsx @@ -35,7 +35,7 @@ const PointsHistoryPage = () => { - + From bbae5bd9fe51e44a7402672ce2deae5ad8687c41 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:13:45 +0900 Subject: [PATCH 16/64] =?UTF-8?q?fix:=20=ED=85=8C=EC=9D=B4=EB=B8=94=20body?= =?UTF-8?q?,=20header=20atom=EC=97=90=20textAlign=20=EC=86=8D=EC=84=B1=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/user/common/atoms/UserTableBodyAtom.tsx | 4 +++- src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx b/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx index 786977b4..21515bd7 100644 --- a/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx +++ b/src/app/_components/user/common/atoms/UserTableBodyAtom.tsx @@ -5,6 +5,7 @@ interface UserTableBodyAtomProps { isSemibold?: boolean; isFirst?: boolean; isLast?: boolean; + textAlign?: 'left' | 'center' | 'right'; } const UserTableBodyAtom = ({ @@ -12,10 +13,11 @@ const UserTableBodyAtom = ({ isSemibold, isFirst, isLast, + textAlign = 'center', }: UserTableBodyAtomProps) => { return ( {children} diff --git a/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx b/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx index 87ce9ecf..596eaa37 100644 --- a/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx +++ b/src/app/_components/user/common/atoms/UserTableHeaderAtom.tsx @@ -3,6 +3,7 @@ interface UserTableHeaderAtomProps { width?: string; isFirst?: boolean; isLast?: boolean; + textAlign?: 'left' | 'center' | 'right'; } const UserTableHeaderAtom = ({ @@ -10,10 +11,11 @@ const UserTableHeaderAtom = ({ width, isFirst, isLast, + textAlign = 'center', }: UserTableHeaderAtomProps) => { return ( {text} From 1d6ec0bc2403fbb3c3bd877a6ac0a1fac2e0d327 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:14:00 +0900 Subject: [PATCH 17/64] =?UTF-8?q?fix:=20=EA=B3=B5=EC=A7=80=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20width=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(user)/(with-layout)/support/notices/page.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/(route)/(user)/(with-layout)/support/notices/page.tsx b/src/app/(route)/(user)/(with-layout)/support/notices/page.tsx index 869c173e..4f9cfb35 100644 --- a/src/app/(route)/(user)/(with-layout)/support/notices/page.tsx +++ b/src/app/(route)/(user)/(with-layout)/support/notices/page.tsx @@ -117,10 +117,10 @@ const UserNoticePage = () => { - + - - + + @@ -145,7 +145,11 @@ const UserNoticePage = () => { />
- {item.title} + +

+ {item.title} +

+
{dayjs(item.createdAt).format('YYYY.MM.DD')} From 5d7af00aa43f433f4449b4289d6ea5ff32d2cfc4 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:38:33 +0900 Subject: [PATCH 18/64] =?UTF-8?q?fix:=20=EB=A7=88=EC=9D=B4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EC=9B=8C=EC=BC=80=EC=9D=B4=EC=85=98=20?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=EB=82=B4=EC=97=AD=20=EB=B0=98=EC=9D=91?= =?UTF-8?q?=ED=98=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/user/mypage/UserWktCard.tsx | 74 +++++++++++-------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/src/app/_components/user/mypage/UserWktCard.tsx b/src/app/_components/user/mypage/UserWktCard.tsx index 54c54b53..a0e73740 100644 --- a/src/app/_components/user/mypage/UserWktCard.tsx +++ b/src/app/_components/user/mypage/UserWktCard.tsx @@ -12,6 +12,7 @@ import { StatusType } from '@/_types/adminType'; import { useGetWinningPercentageQuery } from '@/_hooks/user/useGetWinningPercentageQuery'; import { useGetMemberDetailQuery } from '@/_hooks/common/useGetMemberDetailQuery'; import { usePatchBettingPointMutation } from '@/_hooks/user/usePatchBettingPointMutation'; +import { dateConverter } from '@/_types/converter'; interface WorkationCardProps { thumbnailUrl: string; @@ -121,44 +122,59 @@ const WorkationCard = ({ applyStatusType === 'VISITED' && reviewId !== null; return ( -
- place -
-

{wktName}

-

{place}

-
-
-

모집 인원 : {totalRecruit}명

-

- 모집 기간 : {applyStartDate} - {applyEndDate} -

-

- 워케이션 기간 : {startDate} - {endDate} -

+
+
+ place +
+
+

{wktName}

+

+ {place} +

-
-

+

+
+

모집 인원 : {totalRecruit}명

+

+ 모집 기간 : {dateConverter(applyStartDate)} -{' '} + {dateConverter(applyEndDate)} +

+

+ 워케이션 기간 :
{' '} + {dateConverter(startDate)} - {dateConverter(endDate)} +

+
+ +
+
+
+
+
+
+

베팅 포인트 : {currentBettingPoint} 점

{applyStatusType === 'APPLIED' && ( - )}
- Date: Fri, 16 Aug 2024 01:46:03 +0900 Subject: [PATCH 19/64] =?UTF-8?q?fix:=20=EC=9C=A0=EC=A0=80=20=EB=82=B4?= =?UTF-8?q?=EB=B8=8C=EB=B0=94=20=EB=A1=9C=EA=B3=A0=20=ED=81=B4=EB=A6=AD?= =?UTF-8?q?=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/common/containers/UserNavBarContainer.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/_components/user/common/containers/UserNavBarContainer.tsx b/src/app/_components/user/common/containers/UserNavBarContainer.tsx index 6a671a66..ce7758a0 100644 --- a/src/app/_components/user/common/containers/UserNavBarContainer.tsx +++ b/src/app/_components/user/common/containers/UserNavBarContainer.tsx @@ -1,12 +1,13 @@ 'use client'; -import { usePathname } from 'next/navigation'; +import { usePathname, useRouter } from 'next/navigation'; import Image from 'next/image'; import logo from '@/_assets/images/logo.png'; import UserNavButtonAtom from '@/_components/user/common/atoms/UserNavButtonAtom'; import Link from 'next/link'; const UserNavBarContainer = () => { + const router = useRouter(); const currentPath = usePathname(); const menuItems = [ @@ -18,7 +19,14 @@ const UserNavBarContainer = () => { ]; return (
-
+
{ + if (currentPath === '/') return; + router.push('/'); + }} + > logo
From 0a8cbe284ca005e143109426b2b0487ef89e30a3 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:46:18 +0900 Subject: [PATCH 20/64] =?UTF-8?q?fix:=20=EA=B4=80=EB=A6=AC=EC=9E=90=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=B5=9C=EC=86=8C=20=EC=82=AC=EC=9D=B4?= =?UTF-8?q?=EC=A6=88=20=EC=84=A4=EC=A0=95=20(1280px)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(route)/admin/(with-layout)/layout.tsx | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/layout.tsx b/src/app/(route)/admin/(with-layout)/layout.tsx index 1c7cdde8..15d4e52b 100644 --- a/src/app/(route)/admin/(with-layout)/layout.tsx +++ b/src/app/(route)/admin/(with-layout)/layout.tsx @@ -1,5 +1,7 @@ +import { DkationAdminLogo } from '@/_assets/icons'; import NavBarContainer from '@/_components/common/containers/NavBarContainer'; import HeaderModule from '@/_components/common/modules/HeaderModule'; +import Image from 'next/image'; import { ReactNode } from 'react'; interface Props { @@ -9,10 +11,25 @@ interface Props { const AdminLayout = ({ children }: Props) => { return (
- -
- -
{children}
+ {/* 1280px 미만일 때만 표시 */} +
+ logo +

+ 본 관리자 서비스는 PC 기기를 대상으로 +
제공되고 있습니다. +

+

+ 쾌적한 서비스 이용을 위해 PC 기기에서 접속해주세요. +

+
+
+ +
+ +
+ {children} +
+
); From adb71ebd7034562225c77a3dbdfd59d06ce00e83 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:53:55 +0900 Subject: [PATCH 21/64] =?UTF-8?q?fix:=20TableContainer=EC=97=90=20minWidth?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/common/containers/TableContainer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/_components/common/containers/TableContainer.tsx b/src/app/_components/common/containers/TableContainer.tsx index fcc63345..158c5c30 100644 --- a/src/app/_components/common/containers/TableContainer.tsx +++ b/src/app/_components/common/containers/TableContainer.tsx @@ -4,6 +4,7 @@ import InfiniteScroll from 'react-infinite-scroller'; interface TableContainerProps { children: ReactNode; maxHeight?: string; + minWidth?: string; isInfiniteScroll?: boolean; infiniteScrollProps?: { load: ReactElement; @@ -16,6 +17,7 @@ interface TableContainerProps { const TableContainer = ({ children, maxHeight, + minWidth, isInfiniteScroll, infiniteScrollProps, }: TableContainerProps) => { @@ -33,7 +35,10 @@ const TableContainer = ({ ) : ( - +
{children}
)} From 10dabd60ec4cca58c7c3868cac0724a1b1936fc1 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:54:07 +0900 Subject: [PATCH 22/64] =?UTF-8?q?fix:=20=EB=A9=A4=EB=B2=84=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=ED=85=8C=EC=9D=B4=EB=B8=94=20width=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/(with-layout)/members/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/members/page.tsx b/src/app/(route)/admin/(with-layout)/members/page.tsx index 445f9700..1599acdf 100644 --- a/src/app/(route)/admin/(with-layout)/members/page.tsx +++ b/src/app/(route)/admin/(with-layout)/members/page.tsx @@ -101,8 +101,8 @@ const AdminMembersListPage = () => { 번호 - 이름 - 아이디 + 이름 + 아이디 소속 보유 포인트 포인트 신청 From a2dae88c7305de5e92bd8f94c5b3a85777e876c2 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:54:21 +0900 Subject: [PATCH 23/64] =?UTF-8?q?fix:=20=EC=96=B4=EB=93=9C=EB=AF=BC=20?= =?UTF-8?q?=EB=A9=94=EC=9D=B8=ED=8E=98=EC=9D=B4=EC=A7=80=20width=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/(with-layout)/page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/page.tsx b/src/app/(route)/admin/(with-layout)/page.tsx index fe16eb67..849bdb55 100644 --- a/src/app/(route)/admin/(with-layout)/page.tsx +++ b/src/app/(route)/admin/(with-layout)/page.tsx @@ -90,18 +90,18 @@ const AdminMainPage = () => { type="RIGHT" url="/admin/workation" /> - + 번호 워케이션 - 모집 기간 - 워케이션 기간 + 모집 기간 + 워케이션 기간 모집 인원 지원자 수 결과 및 페널티 - + {!wkData ? ( From ed193baaca9f345e27b895f1b8729579cfc1cdfc Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:56:38 +0900 Subject: [PATCH 24/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A7=80=EA=B8=89=EB=82=B4=EC=97=AD=20=EB=AA=A9=EB=A1=9D=20wid?= =?UTF-8?q?th=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/(with-layout)/points/reward/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/(route)/admin/(with-layout)/points/reward/page.tsx b/src/app/(route)/admin/(with-layout)/points/reward/page.tsx index b2e65ce4..019b9308 100644 --- a/src/app/(route)/admin/(with-layout)/points/reward/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/reward/page.tsx @@ -118,7 +118,7 @@ const AdminPointsRewardPage = () => { 번호 - 구분 + 구분 분류 이름 지급일 From f2ec4ea107e67d47ecf985f7af958a2b990e2a97 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:56:52 +0900 Subject: [PATCH 25/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A7=80=EA=B8=89=20=EC=83=81=EC=84=B8=20dateConverter=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(route)/admin/(with-layout)/points/reward/[id]/page.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/(route)/admin/(with-layout)/points/reward/[id]/page.tsx b/src/app/(route)/admin/(with-layout)/points/reward/[id]/page.tsx index ba919f2b..ce7d9491 100644 --- a/src/app/(route)/admin/(with-layout)/points/reward/[id]/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/reward/[id]/page.tsx @@ -15,6 +15,7 @@ import { pointSupplyTypeConvertList } from '@/_types/adminType'; import React, { useState } from 'react'; import AdminLoading from '@/_components/admin/adminLoading'; import NetworkError from '@/_components/common/networkError'; +import { dateConverter } from '@/_types/converter'; interface RewardDetailPageProps { params: { @@ -59,7 +60,7 @@ const AdminPointsRewardDetailPage = ({ params }: RewardDetailPageProps) => { /> {}} status="readonly" /> From e1a8634be1f4f7e9f816fbee4f56ade2830be003 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 01:58:22 +0900 Subject: [PATCH 26/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A7=80=EA=B8=89=EB=82=B4=EC=97=AD=20=ED=95=84=ED=84=B0?= =?UTF-8?q?=EB=A7=81=20=EA=B5=AC=EB=B6=84=20<>=20=EB=B6=84=EB=A5=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/(with-layout)/points/reward/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/points/reward/page.tsx b/src/app/(route)/admin/(with-layout)/points/reward/page.tsx index 019b9308..3be6ae61 100644 --- a/src/app/(route)/admin/(with-layout)/points/reward/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/reward/page.tsx @@ -188,7 +188,7 @@ const AdminPointsRewardPage = () => { />
setParam({ ...param, type })} @@ -196,7 +196,7 @@ const AdminPointsRewardPage = () => {
{pointPolicyList && ( [ item.id.toString(), item.policyTitle, From 471203a0adda08cc6f58a0ac1875903a9d2d2535 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 02:02:11 +0900 Subject: [PATCH 27/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=A0=95=EC=B1=85=20=EB=AA=A9=EB=A1=9D=20width=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/(with-layout)/points/policy/page.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/points/policy/page.tsx b/src/app/(route)/admin/(with-layout)/points/policy/page.tsx index 1f67b397..d4cdf5bf 100644 --- a/src/app/(route)/admin/(with-layout)/points/policy/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/policy/page.tsx @@ -74,10 +74,10 @@ const AdminPointsPolicyPage = () => { 번호 - 분류 - 포인트 + 분류 + 포인트 상세 내용 - 등록/수정 일시 + 등록/수정 일시 @@ -95,9 +95,17 @@ const AdminPointsPolicyPage = () => { data.pointPolicyList.map((item, idx) => ( {idx + 1} - {item.policyTitle} + +
+ {item.policyTitle} +
+
{item.quantity} - {item.detail} + +
+ {item.detail} +
+
{dayjs(item.modifiedAt).format('YYYY.MM.DD')} From 45f7e906530079786c63ea1dd01b677a4afcdc2c Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 02:04:01 +0900 Subject: [PATCH 28/64] =?UTF-8?q?fix:=20TableBodyAtom=EC=97=90=20break-kee?= =?UTF-8?q?p=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/common/atoms/TableBodyAtom.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/_components/common/atoms/TableBodyAtom.tsx b/src/app/_components/common/atoms/TableBodyAtom.tsx index 8a62a068..45ef2a8f 100644 --- a/src/app/_components/common/atoms/TableBodyAtom.tsx +++ b/src/app/_components/common/atoms/TableBodyAtom.tsx @@ -22,7 +22,7 @@ const TableBodyAtom = ({ }: TableBodyAtomProps) => { return ( {isBoolean !== undefined ? (
From f7360dfd2ecf8049cde9d3687dcff001fd52808b Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 02:06:04 +0900 Subject: [PATCH 29/64] =?UTF-8?q?fix:=20=EB=8B=A8=EC=B2=B4=20=ED=8F=AC?= =?UTF-8?q?=EC=9D=B8=ED=8A=B8=20=EB=93=B1=EB=A1=9D=20memberList=20?= =?UTF-8?q?=ED=98=B8=EC=B6=9C=20size=2010=20>=20100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/(with-layout)/points/reward/new/page.tsx | 2 +- src/app/_hooks/admin/useGetMemberListInfiniteQuery.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/points/reward/new/page.tsx b/src/app/(route)/admin/(with-layout)/points/reward/new/page.tsx index aeb66f2e..ca5ef4f0 100644 --- a/src/app/(route)/admin/(with-layout)/points/reward/new/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/reward/new/page.tsx @@ -44,7 +44,7 @@ const AdminPointsRewardNewPage = () => { isLoading: memberListIsLoading, } = useGetMemberListInifiniteQuery({ // department: selectedOptions.join(','), - pageable: { page: 1, size: 10 }, + pageable: { page: 1, size: 100 }, }); const { diff --git a/src/app/_hooks/admin/useGetMemberListInfiniteQuery.ts b/src/app/_hooks/admin/useGetMemberListInfiniteQuery.ts index da5aeaf5..69322d4c 100644 --- a/src/app/_hooks/admin/useGetMemberListInfiniteQuery.ts +++ b/src/app/_hooks/admin/useGetMemberListInfiniteQuery.ts @@ -19,7 +19,7 @@ export const useGetMemberListInifiniteQuery = ({ }); return memberListSchema.parse(res.data.data); }, - initialPageParam: { page: 1, size: 10 }, + initialPageParam: { page: 1, size: 100 }, getNextPageParam: (lastPage) => { return lastPage.pageInfo.totalElements === 0 || lastPage.pageInfo.totalPages - 1 === lastPage.pageInfo.pageNum From a3ffc0cac97ed2145e73ef18959d29bdd7aede1c Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 09:47:29 +0900 Subject: [PATCH 30/64] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20?= =?UTF-8?q?=EC=9C=A0=ED=9A=A8=EC=84=B1=20=EA=B2=80=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user/login/UserLoginSection.tsx | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/app/_components/user/login/UserLoginSection.tsx b/src/app/_components/user/login/UserLoginSection.tsx index b853fef8..d468e8f3 100644 --- a/src/app/_components/user/login/UserLoginSection.tsx +++ b/src/app/_components/user/login/UserLoginSection.tsx @@ -12,7 +12,8 @@ interface UserLoginSectionProps { const UserLoginSection = ({ onFindPasswordClick }: UserLoginSectionProps) => { const router = useRouter(); - const [error, setError] = useState(null); + const [idError, setIdError] = useState(null); + const [passwordError, setPasswordError] = useState(null); const [form, setForm] = useState({ accountId: '', password: '', @@ -28,9 +29,19 @@ const UserLoginSection = ({ onFindPasswordClick }: UserLoginSectionProps) => { const handleLogin = async (e: React.FormEvent) => { e.preventDefault(); - if (!form.accountId || !form.password) { + setIdError(null); + setPasswordError(null); + + if (!form.accountId) { + setIdError('아이디를 입력해주세요.'); return; } + + if (!form.password) { + setPasswordError('비밀번호를 입력해주세요.'); + return; + } + const result = await signIn('credentials', { accountId: form.accountId, password: form.password, @@ -38,7 +49,14 @@ const UserLoginSection = ({ onFindPasswordClick }: UserLoginSectionProps) => { }); if (result?.error) { - setError(result.error); + if (result.error === '사용자를 찾을 수 없습니다.') { + setIdError(result.error); + return; + } + if (result.error !== '사용자를 찾을 수 없습니다.') { + setPasswordError(result.error); + return; + } console.log('로그인 실패 : ', result); } else { router.replace('/'); @@ -60,7 +78,7 @@ const UserLoginSection = ({ onFindPasswordClick }: UserLoginSectionProps) => { value={form.accountId} onChange={onChange} placeholder="아이디" - error={error === '사용자를 찾을 수 없습니다.' ? error : null} + error={idError} /> { value={form.password} onChange={onChange} placeholder="비밀번호" - error={error !== '사용자를 찾을 수 없습니다.' ? error : null} + error={passwordError} />
Date: Fri, 16 Aug 2024 09:49:44 +0900 Subject: [PATCH 31/64] =?UTF-8?q?fix:=20=ED=8F=AC=EC=9D=B8=ED=8A=B8=20?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=EB=82=B4=EC=97=AD=20=EB=B0=98=EC=9D=91?= =?UTF-8?q?=ED=98=95=20=EC=9E=A1=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/(user)/(with-layout)/points/apply/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/(route)/(user)/(with-layout)/points/apply/page.tsx b/src/app/(route)/(user)/(with-layout)/points/apply/page.tsx index 4b4dd070..b11ebb44 100644 --- a/src/app/(route)/(user)/(with-layout)/points/apply/page.tsx +++ b/src/app/(route)/(user)/(with-layout)/points/apply/page.tsx @@ -41,11 +41,11 @@ const PointsApplyPage = () => {
- + - - + + {!data ? ( From f9c57f0a86a9e754b48071e86ab616b7ce47ce4c Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 10:04:49 +0900 Subject: [PATCH 32/64] =?UTF-8?q?fix:=20=EC=96=B4=EB=93=9C=EB=AF=BC=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=B0=98=EC=9D=91=ED=98=95=20?= =?UTF-8?q?=EC=9E=A1=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(route)/admin/(with-layout)/layout.tsx | 13 +------------ .../(route)/admin/(with-layout)/notices/page.tsx | 2 +- src/app/(route)/admin/(with-layout)/page.tsx | 2 +- .../admin/(with-layout)/points/policy/page.tsx | 4 ++-- .../admin/(with-layout)/points/request/page.tsx | 4 ++-- .../admin/(with-layout)/points/reward/page.tsx | 4 ++-- .../(route)/admin/(with-layout)/workation/page.tsx | 2 +- .../admin/(with-layout)/workation/reviews/page.tsx | 2 +- .../common/atoms/FilteringButtonAtom.tsx | 2 +- src/app/_components/common/modules/HeaderModule.tsx | 2 +- .../common/modules/SearchingBoxModule.tsx | 8 +++++--- .../_components/common/modules/TitleBarModule.tsx | 2 +- 12 files changed, 19 insertions(+), 28 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/layout.tsx b/src/app/(route)/admin/(with-layout)/layout.tsx index 15d4e52b..a09ef4e1 100644 --- a/src/app/(route)/admin/(with-layout)/layout.tsx +++ b/src/app/(route)/admin/(with-layout)/layout.tsx @@ -11,18 +11,7 @@ interface Props { const AdminLayout = ({ children }: Props) => { return (
- {/* 1280px 미만일 때만 표시 */} -
- logo -

- 본 관리자 서비스는 PC 기기를 대상으로 -
제공되고 있습니다. -

-

- 쾌적한 서비스 이용을 위해 PC 기기에서 접속해주세요. -

-
-
+
diff --git a/src/app/(route)/admin/(with-layout)/notices/page.tsx b/src/app/(route)/admin/(with-layout)/notices/page.tsx index 5db29f4f..a4735de6 100644 --- a/src/app/(route)/admin/(with-layout)/notices/page.tsx +++ b/src/app/(route)/admin/(with-layout)/notices/page.tsx @@ -123,7 +123,7 @@ const NoticesListPage = () => { endDatePlaceholder="마감일 선택" /> - + 번호 diff --git a/src/app/(route)/admin/(with-layout)/page.tsx b/src/app/(route)/admin/(with-layout)/page.tsx index 849bdb55..ff422057 100644 --- a/src/app/(route)/admin/(with-layout)/page.tsx +++ b/src/app/(route)/admin/(with-layout)/page.tsx @@ -166,7 +166,7 @@ const AdminMainPage = () => { type="RIGHT" url="/admin/points/request" /> - + 번호 diff --git a/src/app/(route)/admin/(with-layout)/points/policy/page.tsx b/src/app/(route)/admin/(with-layout)/points/policy/page.tsx index d4cdf5bf..4fd54dcb 100644 --- a/src/app/(route)/admin/(with-layout)/points/policy/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/policy/page.tsx @@ -65,11 +65,11 @@ const AdminPointsPolicyPage = () => { return (
-
+
setIsFilteringBarOpen(true)} />
- + 번호 diff --git a/src/app/(route)/admin/(with-layout)/points/request/page.tsx b/src/app/(route)/admin/(with-layout)/points/request/page.tsx index 72269d05..8984d2f7 100644 --- a/src/app/(route)/admin/(with-layout)/points/request/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/request/page.tsx @@ -115,7 +115,7 @@ const AdminPointsRequestPage = () => { return (
-
+
{ onChange={(e) => setSearchValue(e.target.value)} />
- + 번호 diff --git a/src/app/(route)/admin/(with-layout)/points/reward/page.tsx b/src/app/(route)/admin/(with-layout)/points/reward/page.tsx index 3be6ae61..9de76f22 100644 --- a/src/app/(route)/admin/(with-layout)/points/reward/page.tsx +++ b/src/app/(route)/admin/(with-layout)/points/reward/page.tsx @@ -105,7 +105,7 @@ const AdminPointsRewardPage = () => { return (
-
+
{ onClick={() => setIsFilteringBarOpen(true)} />
- + 번호 diff --git a/src/app/(route)/admin/(with-layout)/workation/page.tsx b/src/app/(route)/admin/(with-layout)/workation/page.tsx index f4932a02..f569abb0 100644 --- a/src/app/(route)/admin/(with-layout)/workation/page.tsx +++ b/src/app/(route)/admin/(with-layout)/workation/page.tsx @@ -110,7 +110,7 @@ const WorkationList = () => {
- + 번호 diff --git a/src/app/(route)/admin/(with-layout)/workation/reviews/page.tsx b/src/app/(route)/admin/(with-layout)/workation/reviews/page.tsx index 8a4f0e70..90aaf376 100644 --- a/src/app/(route)/admin/(with-layout)/workation/reviews/page.tsx +++ b/src/app/(route)/admin/(with-layout)/workation/reviews/page.tsx @@ -78,7 +78,7 @@ const AdminWorkationReviewsPage = () => {
- + 번호 diff --git a/src/app/_components/common/atoms/FilteringButtonAtom.tsx b/src/app/_components/common/atoms/FilteringButtonAtom.tsx index 393081f7..0a79223d 100644 --- a/src/app/_components/common/atoms/FilteringButtonAtom.tsx +++ b/src/app/_components/common/atoms/FilteringButtonAtom.tsx @@ -8,7 +8,7 @@ interface FilteringButtonAtomProps { const FilteringButtonAtom = ({ onClick }: FilteringButtonAtomProps) => { return (
diff --git a/src/app/_components/common/modules/SearchingBoxModule.tsx b/src/app/_components/common/modules/SearchingBoxModule.tsx index 7881f3bd..f07c92e2 100644 --- a/src/app/_components/common/modules/SearchingBoxModule.tsx +++ b/src/app/_components/common/modules/SearchingBoxModule.tsx @@ -43,10 +43,12 @@ const SearchingBoxModule = ({ if (widthFull) { widthClass = 'w-full'; } else { - widthClass = filter ? 'w-[312px]' : 'w-[528px]'; + widthClass = filter ? 'max-w-[312px]' : 'max-w-[528px]'; } return ( -
+
{options && options.length > 0 ? ( ) : null}
{ const router = useRouter(); return ( -
+
{type === 'LEFT' && ( Date: Fri, 16 Aug 2024 10:25:38 +0900 Subject: [PATCH 33/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 96 +++++++++++++++++++--------- 1 file changed, 67 insertions(+), 29 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index ec585408..fd859aa6 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -6,6 +6,10 @@ on: workflow_dispatch: repository_dispatch: +env: + KCR_REGISTRY: dkation.kr-central-2.kcr.dev + KCR_REPOSITORY: dkation-prod-front/dkation-prod-fe + jobs: deploy: runs-on: ubuntu-latest @@ -31,34 +35,68 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_KEY }} + - name: Add known hosts + run: | + mkdir -p ~/.ssh + ssh-keyscan -H ${{ secrets.BASTION_HOST }} >> ~/.ssh/known_hosts + IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" + for host in "${HOSTS[@]}"; do + ssh-keyscan -H $host >> ~/.ssh/known_hosts + done + - name: Deploy to FE - uses: appleboy/ssh-action@master - with: - host: ${{ secrets.BASTION_HOST }} - username: ${{ secrets.USER }} - key: ${{ secrets.SSH_KEY }} - script: | - mkdir -p ~/.ssh - echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - - IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" + env: + BASTION_HOST: ${{ secrets.BASTION_HOST }} + USER: ${{ secrets.USER }} + WEB_IPS: ${{ secrets.WEB_IPS }} + ACCESS_KEY: ${{ secrets.ACCESS_KEY }} + ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }} + run: | + IFS=',' read -r -a HOSTS <<< "$WEB_IPS" + + for host in "${HOSTS[@]}" + do + echo "Deploying to $host" + ssh -J $USER@$BASTION_HOST $USER@$host << EOF + set -e + echo "Stopping and removing existing containers" + docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true + docker ps -aq --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker rm || true + + echo "Removing old Docker images" + docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true + + echo "Login to KCR" + echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin + + echo "Pulling new Docker image" + docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} + + echo "Running new Docker container" + docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} + + echo "Checking container health" + max_retries=5 + retries=0 + until docker ps | grep frontend | grep -q "Up" || [ $retries -eq $max_retries ] + do + echo "Waiting for container to be healthy..." + sleep 5 + retries=$((retries+1)) + done + + if [ $retries -eq $max_retries ]; then + echo "Container failed to start properly" + exit 1 + fi + + echo "Container is up and running" + EOF - for host in "${HOSTS[@]}" - do - echo "$host" - ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ubuntu@$host << EOF - echo "Stopping and removing existing containers" - docker ps -q --filter ancestor=dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe | xargs -r docker stop - docker ps -aq --filter ancestor=dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe | xargs -r docker rm - echo "Removing old Docker images" - docker images dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe --format '{{.ID}}' | xargs -r docker rmi - - echo "Login to KCR" - docker login dkation.kr-central-2.kcr.dev --username ${{ secrets.ACCESS_KEY }} --password ${{ secrets.ACCESS_SECRET_KEY }} - echo "Pulling new Docker image" - docker pull dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe:${{ steps.get_tag.outputs.tag }} - echo "Running new Docker container" - docker run -d -p 80:3000 dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe:${{ steps.get_tag.outputs.tag }} - EOF - done \ No newline at end of file + if [ $? -ne 0 ]; then + echo "Deployment to $host failed" + exit 1 + fi + done + + echo "Deployment completed successfully" \ No newline at end of file From 2740144b89de96ebdd6f84aee14cc43695c23bb8 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 10:26:31 +0900 Subject: [PATCH 34/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index fd859aa6..9b5bfb65 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -3,6 +3,9 @@ name: NextJS CD on: release: types: [created] + push: + branches: + - MF-361-Next.js-CD-Github-Action workflow_dispatch: repository_dispatch: From d73d115ac072ebea30f4acd51134c565119c066e Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 10:28:54 +0900 Subject: [PATCH 35/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 9b5bfb65..0705ac34 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -22,15 +22,17 @@ jobs: with: fetch-depth: 0 - - name: Get release tag - id: get_tag + - name: Get release tag or commit hash + id: get_version run: | if [[ ${{ github.event_name }} == 'release' ]]; then - echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT + echo "version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT + elif [[ ${{ github.event_name }} == 'push' ]]; then + echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT else git fetch --tags latest_tag=$(git describe --tags --abbrev=0) - echo "tag=$latest_tag" >> $GITHUB_OUTPUT + echo "version=$latest_tag" >> $GITHUB_OUTPUT fi - name: Setup SSH @@ -73,10 +75,10 @@ jobs: echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin echo "Pulling new Docker image" - docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} + docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} echo "Running new Docker container" - docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} + docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} echo "Checking container health" max_retries=5 From 9b97891398f4581292aeb84080298fc5c3b6784f Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 10:30:50 +0900 Subject: [PATCH 36/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 0705ac34..b26a7905 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -43,9 +43,12 @@ jobs: - name: Add known hosts run: | mkdir -p ~/.ssh + echo "BASTION_HOST: ${{ secrets.BASTION_HOST }}" + echo "WEB_IPS: ${{ secrets.WEB_IPS }}" ssh-keyscan -H ${{ secrets.BASTION_HOST }} >> ~/.ssh/known_hosts IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" for host in "${HOSTS[@]}"; do + echo "Adding host $host to known_hosts" ssh-keyscan -H $host >> ~/.ssh/known_hosts done From 77eeb2c759ae4794002b051efaa724e9940eed7c Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 10:32:57 +0900 Subject: [PATCH 37/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index b26a7905..a9223656 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -27,8 +27,6 @@ jobs: run: | if [[ ${{ github.event_name }} == 'release' ]]; then echo "version=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT - elif [[ ${{ github.event_name }} == 'push' ]]; then - echo "version=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT else git fetch --tags latest_tag=$(git describe --tags --abbrev=0) @@ -43,9 +41,9 @@ jobs: - name: Add known hosts run: | mkdir -p ~/.ssh - echo "BASTION_HOST: ${{ secrets.BASTION_HOST }}" + echo "BASTION_IP: ${{ secrets.BASTION_IP }}" echo "WEB_IPS: ${{ secrets.WEB_IPS }}" - ssh-keyscan -H ${{ secrets.BASTION_HOST }} >> ~/.ssh/known_hosts + ssh-keyscan -H ${{ secrets.BASTION_IP }} >> ~/.ssh/known_hosts IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" for host in "${HOSTS[@]}"; do echo "Adding host $host to known_hosts" @@ -54,7 +52,7 @@ jobs: - name: Deploy to FE env: - BASTION_HOST: ${{ secrets.BASTION_HOST }} + BASTION_HOST: ${{ secrets.BASTION_IP }} USER: ${{ secrets.USER }} WEB_IPS: ${{ secrets.WEB_IPS }} ACCESS_KEY: ${{ secrets.ACCESS_KEY }} From 06d0e14c7e5d4e9940e25ff22fb4b70e70a03d2b Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 10:35:05 +0900 Subject: [PATCH 38/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index a9223656..7cdde61d 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -44,10 +44,18 @@ jobs: echo "BASTION_IP: ${{ secrets.BASTION_IP }}" echo "WEB_IPS: ${{ secrets.WEB_IPS }}" ssh-keyscan -H ${{ secrets.BASTION_IP }} >> ~/.ssh/known_hosts + if [ $? -ne 0 ]; then + echo "Failed to add BASTION_IP to known_hosts" + exit 1 + fi IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" for host in "${HOSTS[@]}"; do echo "Adding host $host to known_hosts" ssh-keyscan -H $host >> ~/.ssh/known_hosts + if [ $? -ne 0 ]; then + echo "Failed to add $host to known_hosts" + exit 1 + fi done - name: Deploy to FE From 6d68b45834808003fa092bde0ecdc0c69156fcb4 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 10:53:07 +0900 Subject: [PATCH 39/64] =?UTF-8?q?fix:=20InputAreaAtom=EC=97=90=20minWidth?= =?UTF-8?q?=20=EC=A3=BC=EC=9E=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/common/atoms/InputAreaAtom.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/_components/common/atoms/InputAreaAtom.tsx b/src/app/_components/common/atoms/InputAreaAtom.tsx index 3dc59bb2..0622c36f 100644 --- a/src/app/_components/common/atoms/InputAreaAtom.tsx +++ b/src/app/_components/common/atoms/InputAreaAtom.tsx @@ -48,9 +48,13 @@ const InputAreaAtom = ({ status !== 'readonly' && status !== 'disabled' && status !== 'cursor'; return ( -
+
e.currentTarget.blur()} /> {isInteractive && textCount && ( -
+
)} From 9efe0384cbe7d3508c9ccc01e7ab550e61e924db Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 10:53:24 +0900 Subject: [PATCH 40/64] =?UTF-8?q?fix:=20=EC=9B=8C=EC=BC=80=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EB=93=B1=EB=A1=9D=20=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=B0=98=EC=9D=91=ED=98=95=20=EB=B0=8F=20=EC=9C=A0=ED=9A=A8?= =?UTF-8?q?=EC=84=B1=20=EC=9E=A1=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-layout)/workation/new/page.tsx | 103 +++++++++++++++--- 1 file changed, 87 insertions(+), 16 deletions(-) diff --git a/src/app/(route)/admin/(with-layout)/workation/new/page.tsx b/src/app/(route)/admin/(with-layout)/workation/new/page.tsx index 65d99790..ecfbd0dc 100644 --- a/src/app/(route)/admin/(with-layout)/workation/new/page.tsx +++ b/src/app/(route)/admin/(with-layout)/workation/new/page.tsx @@ -21,9 +21,13 @@ import NetworkError from '@/_components/common/networkError'; const WorkationNew = () => { const router = useRouter(); - const [formData, setFormData] = useState({ + const [formData, setFormData] = useState<{ + title: string; + number: number | null; + description: string; + }>({ title: '', - number: '', + number: null, description: '', }); const { data, isLoading, isError } = useGetWkPlaceListQuery({ @@ -36,13 +40,13 @@ const WorkationNew = () => { null, ); const [startDateRecruitment, setStartDateRecruitment] = useState( - dayjs().subtract(1, 'year').toDate(), + dayjs().toDate(), ); const [endDateRecruitment, setEndDateRecruitment] = useState( dayjs().toDate(), ); const [startDateWorkation, setStartDateWorkation] = useState( - dayjs().subtract(1, 'year').toDate(), + dayjs().toDate(), ); const [endDateWorkation, setEndDateWorkation] = useState( dayjs().toDate(), @@ -72,6 +76,66 @@ const WorkationNew = () => { [name]: value, })); }; + + const checkData = () => { + if (!formData.title) { + alert('제목을 입력해주세요.'); + return; + } + + if (!selectedPlace) { + alert('선택한 장소를 찾을 수 없습니다.'); + return; + } + + if (!formData.number) { + alert('모집 인원을 입력해주세요.'); + return; + } + + if (formData.number > selectedPlace.maxPeople) { + alert( + `모집 인원이 장소의 최대 인원(${selectedPlace.maxPeople}명)을 초과합니다.`, + ); + return; + } + + if (!formData.description) { + alert('내용을 입력해주세요.'); + return; + } + + if (!startDateRecruitment || !endDateRecruitment) { + alert('모집 기간을 입력해주세요.'); + return; + } + + if (!startDateWorkation || !endDateWorkation) { + alert('워케이션 기간을 입력해주세요.'); + return; + } + + if (dayjs(startDateRecruitment).isAfter(endDateRecruitment)) { + alert('모집 시작일이 마감일보다 늦습니다.'); + return; + } + + if (dayjs(startDateWorkation).isAfter(endDateWorkation)) { + alert('워케이션 시작일이 종료일보다 늦습니다.'); + return; + } + + if ( + dayjs(startDateRecruitment).isAfter(startDateWorkation) || + dayjs(endDateRecruitment).isAfter(startDateWorkation) + ) { + alert('모집 기간이 워케이션 시작일보다 늦습니다.'); + return; + } + + setIsConfirmModelOpen(true); + }; + const handleSelect = (option: string) => { const selected = data.wktPlaceInfos.find((place) => place.place === option); setSelectedPlace(selected || null); @@ -82,6 +146,12 @@ const WorkationNew = () => { alert('선택한 장소를 찾을 수 없습니다.'); return; } + + if (!formData.number) { + alert('모집 인원을 입력해주세요.'); + return; + } + postWk({ wktPlaceId: selectedPlace.id, // 워케이션 목록 api 가져와서 id 주기 title: formData.title, @@ -90,7 +160,7 @@ const WorkationNew = () => { applyStartDate: dayjs(startDateRecruitment!).format('YYYY-MM-DD'), applyEndDate: dayjs(endDateRecruitment!).format('YYYY-MM-DD'), description: formData.description, - totalRecruit: parseInt(formData.number, 10), + totalRecruit: formData.number, }); setIsConfirmModelOpen(false); }; @@ -99,29 +169,29 @@ const WorkationNew = () => { return (
-
-
+
+
{selectedPlace ? ( PlaceGallery ) : ( -
+
PlaceGallery -

+

장소 선택 시
대표 이미지를 확인할 수 있습니다.

)} -
+
-
+
{ name="title" />
-
+
-
+

장소

{ text="등록" type="button" buttonStyle="yellow" - onClick={() => setIsConfirmModelOpen(true)} + onClick={checkData} />
{isConfirmModelOpen && ( From 33709e6315ec53374f6a0263c7b3d719ec5f76c4 Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 10:54:50 +0900 Subject: [PATCH 41/64] =?UTF-8?q?fix:=20InputAreaAtom=EC=97=90=20status=20?= =?UTF-8?q?=EB=B0=94=EA=B9=A5=EC=9C=BC=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/_components/common/atoms/InputAreaAtom.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/_components/common/atoms/InputAreaAtom.tsx b/src/app/_components/common/atoms/InputAreaAtom.tsx index 0622c36f..626fb6f2 100644 --- a/src/app/_components/common/atoms/InputAreaAtom.tsx +++ b/src/app/_components/common/atoms/InputAreaAtom.tsx @@ -50,11 +50,11 @@ const InputAreaAtom = ({ return (
Date: Fri, 16 Aug 2024 10:58:37 +0900 Subject: [PATCH 42/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 7cdde61d..ccc9dbb4 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -38,29 +38,19 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_KEY }} - - name: Add known hosts + - name: Add known hosts for Bastion Host run: | mkdir -p ~/.ssh echo "BASTION_IP: ${{ secrets.BASTION_IP }}" - echo "WEB_IPS: ${{ secrets.WEB_IPS }}" ssh-keyscan -H ${{ secrets.BASTION_IP }} >> ~/.ssh/known_hosts if [ $? -ne 0 ]; then echo "Failed to add BASTION_IP to known_hosts" exit 1 fi - IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" - for host in "${HOSTS[@]}"; do - echo "Adding host $host to known_hosts" - ssh-keyscan -H $host >> ~/.ssh/known_hosts - if [ $? -ne 0 ]; then - echo "Failed to add $host to known_hosts" - exit 1 - fi - done - name: Deploy to FE env: - BASTION_HOST: ${{ secrets.BASTION_IP }} + BASTION_HOST: ${{ secrets.BASTION_HOST }} USER: ${{ secrets.USER }} WEB_IPS: ${{ secrets.WEB_IPS }} ACCESS_KEY: ${{ secrets.ACCESS_KEY }} @@ -84,10 +74,10 @@ jobs: echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin echo "Pulling new Docker image" - docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} echo "Running new Docker container" - docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} echo "Checking container health" max_retries=5 From 6fef3709d6c4e33a2d2b791dc468d3b24d8bbc1a Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 10:59:32 +0900 Subject: [PATCH 43/64] =?UTF-8?q?fix:=20=EC=9B=8C=EC=BC=80=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=9E=A5=EC=86=8C=20=EB=93=B1=EB=A1=9D=20=EC=9C=A0?= =?UTF-8?q?=ED=9A=A8=EC=84=B1=20=EA=B2=80=EC=82=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(with-layout)/workation/place/new/page.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/(route)/admin/(with-layout)/workation/place/new/page.tsx b/src/app/(route)/admin/(with-layout)/workation/place/new/page.tsx index 3b4d5795..fcc84fef 100644 --- a/src/app/(route)/admin/(with-layout)/workation/place/new/page.tsx +++ b/src/app/(route)/admin/(with-layout)/workation/place/new/page.tsx @@ -79,6 +79,20 @@ const AdminWorkationPlaceNewPage = () => { }); }; + const checkData = () => { + if ( + formData.placeName === '' || + formData.address === '' || + formData.maxPeople === 0 || + formData.fileInfos.length === 0 + ) { + alert('모든 정보를 입력해주세요.'); + return false; + } + + setIsConfirmModelOpen(true); + }; + const handleSubmit = () => { postWkPlace({ place: formData.placeName, @@ -211,7 +225,7 @@ const AdminWorkationPlaceNewPage = () => { type="button" width="fixed" buttonStyle="yellow" - onClick={() => setIsConfirmModelOpen(true)} + onClick={checkData} />
{isConfirmModelOpen && ( From 3840a208011ae6fdc439e26dec59bc14f7ed8a09 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:02:09 +0900 Subject: [PATCH 44/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index ccc9dbb4..235afb75 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -57,7 +57,7 @@ jobs: ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }} run: | IFS=',' read -r -a HOSTS <<< "$WEB_IPS" - + for host in "${HOSTS[@]}" do echo "Deploying to $host" @@ -66,19 +66,19 @@ jobs: echo "Stopping and removing existing containers" docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true docker ps -aq --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker rm || true - + echo "Removing old Docker images" docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true - + echo "Login to KCR" echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin - + echo "Pulling new Docker image" - docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} - + docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + echo "Running new Docker container" - docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_tag.outputs.tag }} - + docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + echo "Checking container health" max_retries=5 retries=0 @@ -88,19 +88,19 @@ jobs: sleep 5 retries=$((retries+1)) done - + if [ $retries -eq $max_retries ]; then echo "Container failed to start properly" exit 1 fi - + echo "Container is up and running" - EOF - + EOF + if [ $? -ne 0 ]; then echo "Deployment to $host failed" exit 1 fi done - + echo "Deployment completed successfully" \ No newline at end of file From 1c08a30a66bf3e2b1559d930efcc516b81170d4b Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:03:32 +0900 Subject: [PATCH 45/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 235afb75..9967ff40 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -38,20 +38,28 @@ jobs: with: ssh-private-key: ${{ secrets.SSH_KEY }} - - name: Add known hosts for Bastion Host + - name: Add known hosts run: | mkdir -p ~/.ssh - echo "BASTION_IP: ${{ secrets.BASTION_IP }}" - ssh-keyscan -H ${{ secrets.BASTION_IP }} >> ~/.ssh/known_hosts - if [ $? -ne 0 ]; then - echo "Failed to add BASTION_IP to known_hosts" - exit 1 - fi + echo "${{ secrets.BASTION_IP }} ${{ secrets.BASTION_HOST }}" >> ~/.ssh/known_hosts + echo "${{ secrets.WEB_IPS }}" | tr ',' '\n' | while read ip; do + echo "$ip" >> ~/.ssh/known_hosts + done + + - name: Setup SSH config + run: | + echo "Host bastion" >> ~/.ssh/config + echo " HostName ${{ secrets.BASTION_HOST }}" >> ~/.ssh/config + echo " User ${{ secrets.USER }}" >> ~/.ssh/config + echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config + echo "" >> ~/.ssh/config + echo "Host webserver" >> ~/.ssh/config + echo " ProxyCommand ssh -W %h:%p bastion" >> ~/.ssh/config + echo " User ${{ secrets.USER }}" >> ~/.ssh/config + echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config - name: Deploy to FE env: - BASTION_HOST: ${{ secrets.BASTION_HOST }} - USER: ${{ secrets.USER }} WEB_IPS: ${{ secrets.WEB_IPS }} ACCESS_KEY: ${{ secrets.ACCESS_KEY }} ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }} @@ -61,7 +69,7 @@ jobs: for host in "${HOSTS[@]}" do echo "Deploying to $host" - ssh -J $USER@$BASTION_HOST $USER@$host << EOF + ssh -o ProxyCommand="ssh -W %h:%p bastion" ${{ secrets.USER }}@$host << EOF set -e echo "Stopping and removing existing containers" docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true From a59a350bbcc50df0c32aed8ffef300e2c7a44493 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:05:18 +0900 Subject: [PATCH 46/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 9967ff40..25622b22 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -41,22 +41,22 @@ jobs: - name: Add known hosts run: | mkdir -p ~/.ssh - echo "${{ secrets.BASTION_IP }} ${{ secrets.BASTION_HOST }}" >> ~/.ssh/known_hosts + ssh-keyscan -H ${{ secrets.BASTION_IP }} >> ~/.ssh/known_hosts echo "${{ secrets.WEB_IPS }}" | tr ',' '\n' | while read ip; do - echo "$ip" >> ~/.ssh/known_hosts + ssh-keyscan -H $ip >> ~/.ssh/known_hosts done - name: Setup SSH config run: | - echo "Host bastion" >> ~/.ssh/config - echo " HostName ${{ secrets.BASTION_HOST }}" >> ~/.ssh/config - echo " User ${{ secrets.USER }}" >> ~/.ssh/config - echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config + echo "Host bastion" > ~/.ssh/config + echo " HostName ${{ secrets.BASTION_IP }}" >> ~/.ssh/config + echo " User ${{ secrets.USER }}" >> ~/.ssh/config + echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config echo "" >> ~/.ssh/config echo "Host webserver" >> ~/.ssh/config - echo " ProxyCommand ssh -W %h:%p bastion" >> ~/.ssh/config - echo " User ${{ secrets.USER }}" >> ~/.ssh/config - echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config + echo " ProxyCommand ssh -W %h:%p bastion" >> ~/.ssh/config + echo " User ${{ secrets.USER }}" >> ~/.ssh/config + echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config - name: Deploy to FE env: From 20af20caf59d420811ad7e193ffc47fd1165ab8d Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:09:31 +0900 Subject: [PATCH 47/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 128 +++++++++++---------------- 1 file changed, 54 insertions(+), 74 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 25622b22..385b90e1 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -33,82 +33,62 @@ jobs: echo "version=$latest_tag" >> $GITHUB_OUTPUT fi - - name: Setup SSH - uses: webfactory/ssh-agent@v0.5.4 - with: - ssh-private-key: ${{ secrets.SSH_KEY }} - - - name: Add known hosts - run: | - mkdir -p ~/.ssh - ssh-keyscan -H ${{ secrets.BASTION_IP }} >> ~/.ssh/known_hosts - echo "${{ secrets.WEB_IPS }}" | tr ',' '\n' | while read ip; do - ssh-keyscan -H $ip >> ~/.ssh/known_hosts - done - - - name: Setup SSH config - run: | - echo "Host bastion" > ~/.ssh/config - echo " HostName ${{ secrets.BASTION_IP }}" >> ~/.ssh/config - echo " User ${{ secrets.USER }}" >> ~/.ssh/config - echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config - echo "" >> ~/.ssh/config - echo "Host webserver" >> ~/.ssh/config - echo " ProxyCommand ssh -W %h:%p bastion" >> ~/.ssh/config - echo " User ${{ secrets.USER }}" >> ~/.ssh/config - echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config - - name: Deploy to FE - env: - WEB_IPS: ${{ secrets.WEB_IPS }} - ACCESS_KEY: ${{ secrets.ACCESS_KEY }} - ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }} - run: | - IFS=',' read -r -a HOSTS <<< "$WEB_IPS" - - for host in "${HOSTS[@]}" - do - echo "Deploying to $host" - ssh -o ProxyCommand="ssh -W %h:%p bastion" ${{ secrets.USER }}@$host << EOF - set -e - echo "Stopping and removing existing containers" - docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true - docker ps -aq --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker rm || true - - echo "Removing old Docker images" - docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true - - echo "Login to KCR" - echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin - - echo "Pulling new Docker image" - docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} - - echo "Running new Docker container" - docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} - - echo "Checking container health" - max_retries=5 - retries=0 - until docker ps | grep frontend | grep -q "Up" || [ $retries -eq $max_retries ] - do - echo "Waiting for container to be healthy..." - sleep 5 - retries=$((retries+1)) - done - - if [ $retries -eq $max_retries ]; then - echo "Container failed to start properly" + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.BASTION_HOST }} + username: ${{ secrets.USER }} + key: ${{ secrets.SSH_KEY }} + script: | + mkdir -p ~/.ssh + echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + + IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" + + for host in "${HOSTS[@]}" + do + echo "Deploying to $host" + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << EOF + set -e + echo "Stopping and removing existing containers" + docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true + docker ps -aq --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker rm || true + + echo "Removing old Docker images" + docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true + + echo "Login to KCR" + echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin + + echo "Pulling new Docker image" + docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + + echo "Running new Docker container" + docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + + echo "Checking container health" + max_retries=5 + retries=0 + until docker ps | grep frontend | grep -q "Up" || [ $retries -eq $max_retries ] + do + echo "Waiting for container to be healthy..." + sleep 5 + retries=$((retries+1)) + done + + if [ $retries -eq $max_retries ]; then + echo "Container failed to start properly" + exit 1 + fi + + echo "Container is up and running" + EOF + + if [ $? -ne 0 ]; then + echo "Deployment to $host failed" exit 1 fi - - echo "Container is up and running" - EOF - - if [ $? -ne 0 ]; then - echo "Deployment to $host failed" - exit 1 - fi - done + done echo "Deployment completed successfully" \ No newline at end of file From dc589474c768e098046da35f79e1423551639986 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:11:47 +0900 Subject: [PATCH 48/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 385b90e1..2fbd67ad 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -89,6 +89,8 @@ jobs: echo "Deployment to $host failed" exit 1 fi + + echo "Deployment completed successfully" + done - echo "Deployment completed successfully" \ No newline at end of file From 087632b26504b130a06ceca4b823e385750c804e Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:14:27 +0900 Subject: [PATCH 49/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 2fbd67ad..a235c325 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -36,7 +36,7 @@ jobs: - name: Deploy to FE uses: appleboy/ssh-action@master with: - host: ${{ secrets.BASTION_HOST }} + host: ${{ secrets.BASTION_IP }} username: ${{ secrets.USER }} key: ${{ secrets.SSH_KEY }} script: | From f1bcdcf385dd28e61041355c1bdfd57e1724a3fd Mon Sep 17 00:00:00 2001 From: Ginieee Date: Fri, 16 Aug 2024 11:16:31 +0900 Subject: [PATCH 50/64] =?UTF-8?q?fix:=20=ED=83=80=EC=9D=B4=ED=8B=80=20?= =?UTF-8?q?=EB=B0=8F=20=ED=8C=8C=EB=B9=84=EC=BD=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/favicon.svg | 22 ++++++++++++++++++ public/next.svg | 1 - public/vercel.svg | 1 - .../(route)/admin/(with-layout)/layout.tsx | 5 ++++ src/app/favicon.ico | Bin 25931 -> 0 bytes src/app/layout.tsx | 8 +++++-- 6 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 public/favicon.svg delete mode 100644 public/next.svg delete mode 100644 public/vercel.svg delete mode 100644 src/app/favicon.ico diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 00000000..ee149ffe --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/next.svg b/public/next.svg deleted file mode 100644 index 5174b28c..00000000 --- a/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/vercel.svg b/public/vercel.svg deleted file mode 100644 index d2f84222..00000000 --- a/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/app/(route)/admin/(with-layout)/layout.tsx b/src/app/(route)/admin/(with-layout)/layout.tsx index a09ef4e1..f3c30986 100644 --- a/src/app/(route)/admin/(with-layout)/layout.tsx +++ b/src/app/(route)/admin/(with-layout)/layout.tsx @@ -1,6 +1,7 @@ import { DkationAdminLogo } from '@/_assets/icons'; import NavBarContainer from '@/_components/common/containers/NavBarContainer'; import HeaderModule from '@/_components/common/modules/HeaderModule'; +import { Metadata } from 'next'; import Image from 'next/image'; import { ReactNode } from 'react'; @@ -8,6 +9,10 @@ interface Props { children: ReactNode; } +export const metadata: Metadata = { + title: 'Dkation ADMIN', +}; + const AdminLayout = ({ children }: Props) => { return (
diff --git a/src/app/favicon.ico b/src/app/favicon.ico deleted file mode 100644 index 718d6fea4835ec2d246af9800eddb7ffb276240c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25931 zcmeHv30#a{`}aL_*G&7qml|y<+KVaDM2m#dVr!KsA!#An?kSQM(q<_dDNCpjEux83 zLb9Z^XxbDl(w>%i@8hT6>)&Gu{h#Oeyszu?xtw#Zb1mO{pgX9699l+Qppw7jXaYf~-84xW z)w4x8?=youko|}Vr~(D$UXIbiXABHh`p1?nn8Po~fxRJv}|0e(BPs|G`(TT%kKVJAdg5*Z|x0leQq0 zkdUBvb#>9F()jo|T~kx@OM8$9wzs~t2l;K=woNssA3l6|sx2r3+kdfVW@e^8e*E}v zA1y5{bRi+3Z`uD3{F7LgFJDdvm;nJilkzDku>BwXH(8ItVCXk*-lSJnR?-2UN%hJ){&rlvg`CDTj z)Bzo!3v7Ou#83zEDEFcKt(f1E0~=rqeEbTnMvWR#{+9pg%7G8y>u1OVRUSoox-ovF z2Ydma(;=YuBY(eI|04{hXzZD6_f(v~H;C~y5=DhAC{MMS>2fm~1H_t2$56pc$NH8( z5bH|<)71dV-_oCHIrzrT`2s-5w_+2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}scZlr3-NFJ@NFaJlhyfcw{k^vvtGl`N9xSo**rDW4S}i zM9{fMPWo%4wYDG~BZ18BD+}h|GQKc-g^{++3MY>}W_uq7jGHx{mwE9fZiPCoxN$+7 zrODGGJrOkcPQUB(FD5aoS4g~7#6NR^ma7-!>mHuJfY5kTe6PpNNKC9GGRiu^L31uG z$7v`*JknQHsYB!Tm_W{a32TM099djW%5e+j0Ve_ct}IM>XLF1Ap+YvcrLV=|CKo6S zb+9Nl3_YdKP6%Cxy@6TxZ>;4&nTneadr z_ES90ydCev)LV!dN=#(*f}|ZORFdvkYBni^aLbUk>BajeWIOcmHP#8S)*2U~QKI%S zyrLmtPqb&TphJ;>yAxri#;{uyk`JJqODDw%(Z=2`1uc}br^V%>j!gS)D*q*f_-qf8&D;W1dJgQMlaH5er zN2U<%Smb7==vE}dDI8K7cKz!vs^73o9f>2sgiTzWcwY|BMYHH5%Vn7#kiw&eItCqa zIkR2~Q}>X=Ar8W|^Ms41Fm8o6IB2_j60eOeBB1Br!boW7JnoeX6Gs)?7rW0^5psc- zjS16yb>dFn>KPOF;imD}e!enuIniFzv}n$m2#gCCv4jM#ArwlzZ$7@9&XkFxZ4n!V zj3dyiwW4Ki2QG{@i>yuZXQizw_OkZI^-3otXC{!(lUpJF33gI60ak;Uqitp74|B6I zgg{b=Iz}WkhCGj1M=hu4#Aw173YxIVbISaoc z-nLZC*6Tgivd5V`K%GxhBsp@SUU60-rfc$=wb>zdJzXS&-5(NRRodFk;Kxk!S(O(a0e7oY=E( zAyS;Ow?6Q&XA+cnkCb{28_1N8H#?J!*$MmIwLq^*T_9-z^&UE@A(z9oGYtFy6EZef LrJugUA?W`A8`#=m diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 93bd590a..3424314f 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -9,8 +9,12 @@ import { DkationLogo } from './_assets/icons'; const notoSansKR = Noto_Sans_KR({ subsets: ['latin'] }); export const metadata: Metadata = { - title: 'Create Next App', - description: 'Generated by create next app', + title: 'Dkation: 워케이션 추첨 서비스', + icons: [ + { + url: '/favicon.svg', + }, + ], }; export default function RootLayout({ From 97001d27b316a445cd7488442274b981c8ce5c61 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:18:12 +0900 Subject: [PATCH 51/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index a235c325..ccd1bdeb 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -1,5 +1,4 @@ name: NextJS CD - on: release: types: [created] @@ -8,11 +7,9 @@ on: - MF-361-Next.js-CD-Github-Action workflow_dispatch: repository_dispatch: - env: KCR_REGISTRY: dkation.kr-central-2.kcr.dev KCR_REPOSITORY: dkation-prod-front/dkation-prod-fe - jobs: deploy: runs-on: ubuntu-latest @@ -21,7 +18,6 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Get release tag or commit hash id: get_version run: | @@ -32,7 +28,6 @@ jobs: latest_tag=$(git describe --tags --abbrev=0) echo "version=$latest_tag" >> $GITHUB_OUTPUT fi - - name: Deploy to FE uses: appleboy/ssh-action@master with: @@ -49,7 +44,7 @@ jobs: for host in "${HOSTS[@]}" do echo "Deploying to $host" - ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << EOF + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << 'EOF' set -e echo "Stopping and removing existing containers" docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true @@ -83,14 +78,12 @@ jobs: fi echo "Container is up and running" - EOF - + if [ $? -ne 0 ]; then echo "Deployment to $host failed" exit 1 fi - echo "Deployment completed successfully" - + EOF done - + echo "Deployment completed successfully" From 249151c00195e5a977836db03ef0ef8c82057324 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:25:12 +0900 Subject: [PATCH 52/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index ccd1bdeb..0aa65ce0 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -7,9 +7,11 @@ on: - MF-361-Next.js-CD-Github-Action workflow_dispatch: repository_dispatch: + env: KCR_REGISTRY: dkation.kr-central-2.kcr.dev KCR_REPOSITORY: dkation-prod-front/dkation-prod-fe + jobs: deploy: runs-on: ubuntu-latest @@ -54,7 +56,7 @@ jobs: docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true echo "Login to KCR" - echo "$ACCESS_SECRET_KEY" | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin + docker login $KCR_REGISTRY --username ${{ secrets.ACCESS_KEY }} --password ${{ secrets.ACCESS_SECRET_KEY }} echo "Pulling new Docker image" docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} @@ -78,12 +80,12 @@ jobs: fi echo "Container is up and running" - +EOF if [ $? -ne 0 ]; then echo "Deployment to $host failed" exit 1 fi - EOF - done - echo "Deployment completed successfully" + echo "Deployment completed successfully" + + done \ No newline at end of file From d819a4c2d6cf3cb876fc70190e4674b2762f7fce Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:27:41 +0900 Subject: [PATCH 53/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 0aa65ce0..1ad47a7d 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -80,7 +80,8 @@ jobs: fi echo "Container is up and running" -EOF + EOF + if [ $? -ne 0 ]; then echo "Deployment to $host failed" exit 1 From 700b82078398e64fd795236be3621b9ab6065aed Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 11:28:24 +0900 Subject: [PATCH 54/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 1ad47a7d..fd056f58 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -80,7 +80,7 @@ jobs: fi echo "Container is up and running" - EOF + EOF if [ $? -ne 0 ]; then echo "Deployment to $host failed" From bd40c1b08a59e3d59ea8e9c921046422ded1e52d Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:04:34 +0900 Subject: [PATCH 55/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index fd056f58..e59b72e6 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -20,6 +20,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 + - name: Get release tag or commit hash id: get_version run: | @@ -30,6 +31,7 @@ jobs: latest_tag=$(git describe --tags --abbrev=0) echo "version=$latest_tag" >> $GITHUB_OUTPUT fi + - name: Deploy to FE uses: appleboy/ssh-action@master with: @@ -56,8 +58,8 @@ jobs: docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true echo "Login to KCR" - docker login $KCR_REGISTRY --username ${{ secrets.ACCESS_KEY }} --password ${{ secrets.ACCESS_SECRET_KEY }} - + echo ${{ secrets.ACCESS_SECRET_KEY }} | docker login $KCR_REGISTRY --username ${{ secrets.ACCESS_KEY }} --password-stdin + echo "Pulling new Docker image" docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} From 499014a9057fd2dd068340d13393cf402c318bbe Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:06:49 +0900 Subject: [PATCH 56/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 36 ++++++++++++++++------------ 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index e59b72e6..4b960947 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -42,30 +42,36 @@ jobs: mkdir -p ~/.ssh echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa - + IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" - + + KCR_REGISTRY='${{ env.KCR_REGISTRY }}' + KCR_REPOSITORY='${{ env.KCR_REPOSITORY }}' + ACCESS_KEY='${{ secrets.ACCESS_KEY }}' + ACCESS_SECRET_KEY='${{ secrets.ACCESS_SECRET_KEY }}' + for host in "${HOSTS[@]}" do echo "Deploying to $host" - ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << 'EOF' + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << EOF set -e + echo "Stopping and removing existing containers" docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true docker ps -aq --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker rm || true - + echo "Removing old Docker images" docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true - + echo "Login to KCR" - echo ${{ secrets.ACCESS_SECRET_KEY }} | docker login $KCR_REGISTRY --username ${{ secrets.ACCESS_KEY }} --password-stdin - + echo $ACCESS_SECRET_KEY | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin + echo "Pulling new Docker image" docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} - + echo "Running new Docker container" docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} - + echo "Checking container health" max_retries=5 retries=0 @@ -75,20 +81,20 @@ jobs: sleep 5 retries=$((retries+1)) done - + if [ $retries -eq $max_retries ]; then echo "Container failed to start properly" exit 1 fi - + echo "Container is up and running" - EOF - + EOF + if [ $? -ne 0 ]; then echo "Deployment to $host failed" exit 1 fi - + echo "Deployment completed successfully" - + done \ No newline at end of file From 3dba12ee523b033d81e02eded25ed9d96e9bd39e Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:08:19 +0900 Subject: [PATCH 57/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 4b960947..3f4c4855 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -53,7 +53,7 @@ jobs: for host in "${HOSTS[@]}" do echo "Deploying to $host" - ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << EOF + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << 'EOF' set -e echo "Stopping and removing existing containers" From 5c520db4b770bc40195dd83d0beed463e84ab3b4 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:09:50 +0900 Subject: [PATCH 58/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 3f4c4855..3203751c 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -88,7 +88,6 @@ jobs: fi echo "Container is up and running" - EOF if [ $? -ne 0 ]; then echo "Deployment to $host failed" @@ -96,5 +95,6 @@ jobs: fi echo "Deployment completed successfully" - + + EOF done \ No newline at end of file From 5884b33be253ba1490d96341208fdc9714bf418c Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:29:48 +0900 Subject: [PATCH 59/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 3203751c..341baef9 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -11,6 +11,8 @@ on: env: KCR_REGISTRY: dkation.kr-central-2.kcr.dev KCR_REPOSITORY: dkation-prod-front/dkation-prod-fe + ACCESS_KEY: ${{ secrets.ACCESS_KEY }} + ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }} jobs: deploy: @@ -45,11 +47,6 @@ jobs: IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" - KCR_REGISTRY='${{ env.KCR_REGISTRY }}' - KCR_REPOSITORY='${{ env.KCR_REPOSITORY }}' - ACCESS_KEY='${{ secrets.ACCESS_KEY }}' - ACCESS_SECRET_KEY='${{ secrets.ACCESS_SECRET_KEY }}' - for host in "${HOSTS[@]}" do echo "Deploying to $host" @@ -57,20 +54,20 @@ jobs: set -e echo "Stopping and removing existing containers" - docker ps -q --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker stop || true - docker ps -aq --filter ancestor=$KCR_REGISTRY/$KCR_REPOSITORY | xargs -r docker rm || true - + docker ps --format '{{.ID}} {{.Image}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | awk '{print $1}' | xargs -r docker stop && \ + docker ps -a --format '{{.ID}} {{.Image}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | awk '{print $1}' | xargs -r docker rm && \ + echo "Removing old Docker images" - docker images $KCR_REGISTRY/$KCR_REPOSITORY --format '{{.ID}}' | xargs -r docker rmi || true + docker images --format '{{.Repository}}:{{.Tag}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | xargs -r docker rmi echo "Login to KCR" - echo $ACCESS_SECRET_KEY | docker login $KCR_REGISTRY --username $ACCESS_KEY --password-stdin + echo ${{ env.ACCESS_SECRET_KEY }} | docker login $KCR_REGISTRY --username ${{ env.ACCESS_KEY}} --password-stdin echo "Pulling new Docker image" docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} echo "Running new Docker container" - docker run -d -p 80:3000 --name frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + docker run -d -p 80:3000 --name dkation-frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} echo "Checking container health" max_retries=5 From ad4d62b08431e0edb7b96daffce27b2387a89ade Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:31:53 +0900 Subject: [PATCH 60/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 341baef9..9c839bef 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -60,9 +60,6 @@ jobs: echo "Removing old Docker images" docker images --format '{{.Repository}}:{{.Tag}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | xargs -r docker rmi - echo "Login to KCR" - echo ${{ env.ACCESS_SECRET_KEY }} | docker login $KCR_REGISTRY --username ${{ env.ACCESS_KEY}} --password-stdin - echo "Pulling new Docker image" docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} From 34b7404a3ee8d5acee9db9b593a0e6ce85cd438f Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:34:34 +0900 Subject: [PATCH 61/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 9c839bef..89f56d3f 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -46,42 +46,46 @@ jobs: chmod 600 ~/.ssh/id_rsa IFS=',' read -r -a HOSTS <<< "${{ secrets.WEB_IPS }}" + KCR_REGISTRY="${{ env.KCR_REGISTRY }}" + KCR_REPOSITORY="${{ env.KCR_REPOSITORY }}" + VERSION="${{ steps.get_version.outputs.version }}" for host in "${HOSTS[@]}" do echo "Deploying to $host" - ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << 'EOF' + ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no ${{ secrets.USER }}@$host << EOF set -e echo "Stopping and removing existing containers" - docker ps --format '{{.ID}} {{.Image}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | awk '{print $1}' | xargs -r docker stop && \ - docker ps -a --format '{{.ID}} {{.Image}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | awk '{print $1}' | xargs -r docker rm && \ - + docker ps --format '{{.ID}} {{.Image}}' | grep '$KCR_REGISTRY/$KCR_REPOSITORY' | awk '{print \$1}' | xargs -r docker stop + docker ps -a --format '{{.ID}} {{.Image}}' | grep '$KCR_REGISTRY/$KCR_REPOSITORY' | awk '{print \$1}' | xargs -r docker rm + echo "Removing old Docker images" - docker images --format '{{.Repository}}:{{.Tag}}' | grep 'dkation.kr-central-2.kcr.dev/dkation-prod-front/dkation-prod-fe' | xargs -r docker rmi + docker images --format '{{.Repository}}:{{.Tag}}' | grep '$KCR_REGISTRY/$KCR_REPOSITORY' | xargs -r docker rmi echo "Pulling new Docker image" - docker pull $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + docker pull $KCR_REGISTRY/$KCR_REPOSITORY:$VERSION echo "Running new Docker container" - docker run -d -p 80:3000 --name dkation-frontend $KCR_REGISTRY/$KCR_REPOSITORY:${{ steps.get_version.outputs.version }} + docker run -d -p 80:3000 --name dkation-frontend $KCR_REGISTRY/$KCR_REPOSITORY:$VERSION echo "Checking container health" max_retries=5 retries=0 - until docker ps | grep frontend | grep -q "Up" || [ $retries -eq $max_retries ] + until docker ps | grep dkation-frontend | grep -q "Up" || [ \$retries -eq \$max_retries ] do echo "Waiting for container to be healthy..." sleep 5 - retries=$((retries+1)) + retries=\$((retries+1)) done - if [ $retries -eq $max_retries ]; then + if [ \$retries -eq \$max_retries ]; then echo "Container failed to start properly" exit 1 fi echo "Container is up and running" + EOF if [ $? -ne 0 ]; then echo "Deployment to $host failed" @@ -89,6 +93,4 @@ jobs: fi echo "Deployment completed successfully" - - EOF done \ No newline at end of file From 9f5a988772dacdb08b027d483bb350996a84d349 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:38:08 +0900 Subject: [PATCH 62/64] fix: CD workflow --- .github/workflows/nextjs-prod-CD.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index 89f56d3f..b98c5942 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -49,6 +49,8 @@ jobs: KCR_REGISTRY="${{ env.KCR_REGISTRY }}" KCR_REPOSITORY="${{ env.KCR_REPOSITORY }}" VERSION="${{ steps.get_version.outputs.version }}" + AK="${{ env.ACCESS_KEY }}" + SK="${{ env.ACCESS_SECRET_KEY }}" for host in "${HOSTS[@]}" do @@ -63,6 +65,9 @@ jobs: echo "Removing old Docker images" docker images --format '{{.Repository}}:{{.Tag}}' | grep '$KCR_REGISTRY/$KCR_REPOSITORY' | xargs -r docker rmi + echo "Docker login" + echo "$SK" | docker login $KCR_REGISTRY -u "$AK" --password-stdin + echo "Pulling new Docker image" docker pull $KCR_REGISTRY/$KCR_REPOSITORY:$VERSION From 8e2b24603a0c4a28810fd5a5a16e65ea3d05dbe9 Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 13:54:02 +0900 Subject: [PATCH 63/64] fix: CI/CD workflow --- .github/workflows/nextjs-prod-CD.yml | 3 --- .github/workflows/nextjs-prod-CI.yml | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index b98c5942..c7f4e821 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -2,9 +2,6 @@ name: NextJS CD on: release: types: [created] - push: - branches: - - MF-361-Next.js-CD-Github-Action workflow_dispatch: repository_dispatch: diff --git a/.github/workflows/nextjs-prod-CI.yml b/.github/workflows/nextjs-prod-CI.yml index 20061525..f9924b95 100644 --- a/.github/workflows/nextjs-prod-CI.yml +++ b/.github/workflows/nextjs-prod-CI.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - MF-361-Next.js-CD-Github-Action workflow_dispatch: permissions: @@ -108,9 +109,10 @@ jobs: - name: Create Release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT }} with: tag_name: ${{ steps.create_tag.outputs.NEW_TAG }} release_name: Release ${{ steps.create_tag.outputs.NEW_TAG }} draft: false prerelease: false + token: ${{ secrets.PAT }} From b74d5641696cc84294a03cf4fdf36fc8ebf329bd Mon Sep 17 00:00:00 2001 From: MinhoJJang Date: Fri, 16 Aug 2024 14:05:02 +0900 Subject: [PATCH 64/64] fix: final CI/CD workflow --- .github/workflows/nextjs-prod-CD.yml | 2 -- .github/workflows/nextjs-prod-CI.yml | 1 - 2 files changed, 3 deletions(-) diff --git a/.github/workflows/nextjs-prod-CD.yml b/.github/workflows/nextjs-prod-CD.yml index c7f4e821..4b679098 100644 --- a/.github/workflows/nextjs-prod-CD.yml +++ b/.github/workflows/nextjs-prod-CD.yml @@ -2,8 +2,6 @@ name: NextJS CD on: release: types: [created] - workflow_dispatch: - repository_dispatch: env: KCR_REGISTRY: dkation.kr-central-2.kcr.dev diff --git a/.github/workflows/nextjs-prod-CI.yml b/.github/workflows/nextjs-prod-CI.yml index f9924b95..6eb525be 100644 --- a/.github/workflows/nextjs-prod-CI.yml +++ b/.github/workflows/nextjs-prod-CI.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - MF-361-Next.js-CD-Github-Action workflow_dispatch: permissions: