From bd0f852f8ad12564a3576fe9d30856975ee2794a Mon Sep 17 00:00:00 2001 From: Philip Cheung Date: Tue, 8 Oct 2024 13:35:35 +0800 Subject: [PATCH] depoly --- Dockerfile | 20 +++++++++++++ app/favicon.ico | Bin 6074 -> 44158 bytes components/Aboutus/AboutusContent.tsx | 10 +++---- components/Aboutus/Map.tsx | 2 +- components/Course/Collapse.tsx | 6 ++-- components/Course/CourseImagesSilder.tsx | 4 +-- components/Course/LongDesc.tsx | 2 +- components/CoursesSilder.tsx | 4 +-- docker-compose.yml | 35 +++++++++++++++++++++++ favicon.ico | Bin 0 -> 44158 bytes public/favicon.ico | Bin 0 -> 44158 bytes utils/index.ts | 16 +++++++---- 12 files changed, 79 insertions(+), 20 deletions(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 favicon.ico create mode 100644 public/favicon.ico diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..872d92f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ + +FROM node:18-alpine + +WORKDIR /app + +COPY package.json ./ + +RUN npm install + +RUN npm install --save-dev + +# Build the Next.js app +RUN npm run build + +# Expose the port the app will run on +EXPOSE 3000 + +COPY . . + +CMD ["npm", "run", "dev"] \ No newline at end of file diff --git a/app/favicon.ico b/app/favicon.ico index 04fa8678fc0d66dbf2f08fe95929be376a11791f..c2a2a0439812fa49e5dec061d4d704fe6de2aac5 100644 GIT binary patch literal 44158 zcmeHQ3vgA%8U7PMh(w$!1?vl}FA!T>pQxooQ7YJwgb<)sDy^^TI8?3GYPE@vj#cVw z9LH9xMJu&-+NrivTk9wYingLWl6wOJ5(F{6u^@!Jw%@nA|2-#%1eCe=KyuGAKj-dw z?VkTT|6~9C_e7)s|1P*x@c&Tx;h#kYiO4X}1)w?*_p{8JEwayGM|MY#`Og&em`CZ> z4-()|Bc`xhKS~eje2L8IcabdY!^f$TKlSP%kJarSqeg11JdBeSeaj_XUL~vc=0gCV z-reqDdPs*$#8}=Fj|xfsLL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3^vYt5Z9#Qa1&>s*MHN|n#Qs=lE-=&lL}#HxiDXiV{Od>y)#nDu557sAabaV@fsYXFh4h9s2!hm zdmCS*ZEq_@Si(`qkr{3%Wrui~;|>H1KHI3V=;5ZSn(TWloc4fL zm`;oFS3Dh)Z)3!n-{pz${b_Z;R4*9~$s~2yylhML=ofC#b<2x~r753DvP!GErT6GY zw7%T;P75mC6qxXUu(GJ@AVhS)%)VHO)+k8?PUIZBKuH}a{w+{YFl-7(hi`VE&=No9 zh;AMp)^=v3|JL!r=%cwFyW+qf~2L+3Ks3?6m1rBCTcm^Y6~T#P z`S0>{)5h`xROJ*X>EsTrI+*&k-ReJ>qbzHLu;^b~gDEsWOihOqg`)i28(W9rabgR= zNco6S4gQNZN|VRkGm|Y&`UV-xgbeRX-}#nx>p?7MOkt{{8L`gmTW|E}nE|Oj4oY^} yPf;^y50%9*DXvV@A&0&?7Qs(e7JV%`mtZ|ndA<1Kgy8Ex(lF(_N)-wg5&sXGCaJjq diff --git a/components/Aboutus/AboutusContent.tsx b/components/Aboutus/AboutusContent.tsx index 612a8ca..0f04680 100644 --- a/components/Aboutus/AboutusContent.tsx +++ b/components/Aboutus/AboutusContent.tsx @@ -13,7 +13,7 @@ const AboutusContent = ({ aboutus }: { aboutus: AboutusProps[] }) => {
Course Image { {item.description}

*/}
@@ -54,7 +54,7 @@ const AboutusContent = ({ aboutus }: { aboutus: AboutusProps[] }) => {
Course Image {
Course Image { {item.description}

*/}
diff --git a/components/Aboutus/Map.tsx b/components/Aboutus/Map.tsx index 35ab2d4..90d1ca1 100644 --- a/components/Aboutus/Map.tsx +++ b/components/Aboutus/Map.tsx @@ -47,7 +47,7 @@ const Map = ({ settings }: { settings: SettingsProps }) => {

{"地址"}

- diff --git a/components/Course/Collapse.tsx b/components/Course/Collapse.tsx index 9b5dc90..b252342 100644 --- a/components/Course/Collapse.tsx +++ b/components/Course/Collapse.tsx @@ -13,7 +13,7 @@ interface CollapseProps { className?: string info?: boolean info_images?: Array - + } @@ -113,7 +113,7 @@ const Collapse: React.FC = ({ title, children, className, info, i {info_images.map((image, index) => (
{`Course @@ -128,7 +128,7 @@ const Collapse: React.FC = ({ title, children, className, info, i
{`Course diff --git a/components/Course/CourseImagesSilder.tsx b/components/Course/CourseImagesSilder.tsx index 3f20327..025869d 100644 --- a/components/Course/CourseImagesSilder.tsx +++ b/components/Course/CourseImagesSilder.tsx @@ -107,7 +107,7 @@ const CourseImagesSilder = ({ courseData }: { courseData: CoursesProps }) => { {courseData.images.map((image, index) => (
{`Course @@ -127,7 +127,7 @@ const CourseImagesSilder = ({ courseData }: { courseData: CoursesProps }) => {
{`Course diff --git a/components/Course/LongDesc.tsx b/components/Course/LongDesc.tsx index 3447b3f..b266df5 100644 --- a/components/Course/LongDesc.tsx +++ b/components/Course/LongDesc.tsx @@ -8,7 +8,7 @@ const LongDesc = ({ courseData }: { courseData: CoursesProps }) => { {courseData.title}

diff --git a/components/CoursesSilder.tsx b/components/CoursesSilder.tsx index dc7ac45..25fdb91 100644 --- a/components/CoursesSilder.tsx +++ b/components/CoursesSilder.tsx @@ -49,7 +49,7 @@ const CoursesSilder = ({ courses }: { courses: CoursesProps[] }) => {
Course Image {
Course Image diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7ea57ee --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +services: + app: + build: + context: . + dockerfile: Dockerfile + container_name: docker-next + + env_file: + - .env + ports: + - '3000:3000' + volumes: + - .:/app + - /app/node_modules + labels: + - traefik.enable=true + - traefik.docker.network=traefik-public + - traefik.constraint-label=traefik-public + + - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80 + + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.entrypoints=http + + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.entrypoints=https + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls=true + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls.certresolver=le + + # Enable www redirection for HTTP and HTTPS + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.middlewares=${STACK_NAME?Variable not set}-www-redirect + - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.middlewares=https-redirect,${STACK_NAME?Variable not set}-www-redirect + networks: + - traefik-public + - default \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c2a2a0439812fa49e5dec061d4d704fe6de2aac5 GIT binary patch literal 44158 zcmeHQ3vgA%8U7PMh(w$!1?vl}FA!T>pQxooQ7YJwgb<)sDy^^TI8?3GYPE@vj#cVw z9LH9xMJu&-+NrivTk9wYingLWl6wOJ5(F{6u^@!Jw%@nA|2-#%1eCe=KyuGAKj-dw z?VkTT|6~9C_e7)s|1P*x@c&Tx;h#kYiO4X}1)w?*_p{8JEwayGM|MY#`Og&em`CZ> z4-()|Bc`xhKS~eje2L8IcabdY!^f$TKlSP%kJarSqeg11JdBeSeaj_XUL~vc=0gCV z-reqDdPs*$#8}=Fj|xfsLLV#9UCN1gw_#ZTCUbzv57>k7{&;(ov{ot$_aql8r2af$ zvY|qj(7lvIM#zQu%W>Y8iu_C(xU3D za!K9$9r*}4EBykw;$r^Nh<1bC#&D`mBrC~rVUmYv3K=&_i)l-JGan4?No?+5$w z@nm_&lu7z=GDYJldCj0*@bEQ0h5|fZnk?&qN9v{MglzkO8Y@f;P^u_QJ_ekOvW8&+@Y+#RE3u94{ZAcwCSP z<%;SwttZ>uaX{@g^^>#Z=}nWYO|P#)n$%ObC@ zoNvWBT;Q^{N*3BY-vp0bVN6+H@=M@MA*GP1S!Z!6QyQT+S}!p|T1&4ZxxqL|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k+4;NWzCcD&W5DCfDIb2mx9f4am6^=gqnr1FD|~RMJCa=HldR`wd?lpN&qv?Z6qbf98g<=oYNcq zw<$G_rMe4v*!7&RxUK{~T8_Jxr?(II3mI7CWADI3a}!g*!+x9Lr38<7UJi!oNr4=XL+WQ#IGFi_4PTIpl!qCd9XX4f%LKXex-a1pAU-x#xi6yZ5(h8B<}K ziO$MB=eue_$B7t|jE9U|lHk!5r{di2XHnXMAM zf19O`X_4T4ZI;5;Q$qDNDV$pvs<+QA8r>?P_kHB?a|Lbc{mor3LT!ZPW5d89P2uCF zao8|9IXK@eIcc#B7@fJ^{O$h5((A6E{@BdLQgTI5KeKd}OdU|2k^i#8XUWUG7G>&- z9-Spm&Hd?U)eno7PM7CL_MNYF^Dd0$tu?LHDxZyWWlrmcy)(x*%`K=l10-|2xdin! z4MX(&WQDCK;mrNa;z+%*u;cL$ zBK1v?dUNFZXuU1ce(R0Z9olb?)XixfkDEgx^+zK0C6W5Oa}0{|$C$=QeN&{~e4at! G`TqyqUUlgJ literal 0 HcmV?d00001 diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..c2a2a0439812fa49e5dec061d4d704fe6de2aac5 GIT binary patch literal 44158 zcmeHQ3vgA%8U7PMh(w$!1?vl}FA!T>pQxooQ7YJwgb<)sDy^^TI8?3GYPE@vj#cVw z9LH9xMJu&-+NrivTk9wYingLWl6wOJ5(F{6u^@!Jw%@nA|2-#%1eCe=KyuGAKj-dw z?VkTT|6~9C_e7)s|1P*x@c&Tx;h#kYiO4X}1)w?*_p{8JEwayGM|MY#`Og&em`CZ> z4-()|Bc`xhKS~eje2L8IcabdY!^f$TKlSP%kJarSqeg11JdBeSeaj_XUL~vc=0gCV z-reqDdPs*$#8}=Fj|xfsLLV#9UCN1gw_#ZTCUbzv57>k7{&;(ov{ot$_aql8r2af$ zvY|qj(7lvIM#zQu%W>Y8iu_C(xU3D za!K9$9r*}4EBykw;$r^Nh<1bC#&D`mBrC~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uHdZ`G$Nm%2*7#)h)69b2A;E$4cJ6l0OuShq>pq5h&iB}U;wyiNptA9SrJVsjSg zXwX0qukF@F$0gwV)!^%7J`7~z8n3IYy~eSyjtc)q-0E%Ej@13UPRA|$orOYdhyneQ z&SZy}9S%ALbUNspps#`Gb6fj}Z8t1VZ_#!Dhx=*M!QZP~&gVAyZec9=+v368YCgE? ztQ;|+H||RxnnbKRE42T#ft}&k+4;NWzCcD&W5DCfDIb2mx9f4am6^=gqnr1FD|~RMJCa=HldR`wd?lpN&qv?Z6qbf98g<=oYNcq zw<$G_rMe4v*!7&RxUK{~T8_Jxr?(II3mI7CWADI3a}!g*!+x9Lr38<7UJi!oNr4=XL+WQ#IGFi_4PTIpl!qCd9XX4f%LKXex-a1pAU-x#xi6yZ5(h8B<}K ziO$MB=eue_$B7t|jE9U|lHk!5r{di2XHnXMAM zf19O`X_4T4ZI;5;Q$qDNDV$pvs<+QA8r>?P_kHB?a|Lbc{mor3LT!ZPW5d89P2uCF zao8|9IXK@eIcc#B7@fJ^{O$h5((A6E{@BdLQgTI5KeKd}OdU|2k^i#8XUWUG7G>&- z9-Spm&Hd?U)eno7PM7CL_MNYF^Dd0$tu?LHDxZyWWlrmcy)(x*%`K=l10-|2xdin! z4MX(&WQDCK;mrNa;z+%*u;cL$ zBK1v?dUNFZXuU1ce(R0Z9olb?)XixfkDEgx^+zK0C6W5Oa}0{|$C$=QeN&{~e4at! G`TqyqUUlgJ literal 0 HcmV?d00001 diff --git a/utils/index.ts b/utils/index.ts index 166146d..ae353d3 100644 --- a/utils/index.ts +++ b/utils/index.ts @@ -11,7 +11,7 @@ export async function postMessage(data: MessageProps) { }; const body = JSON.stringify(data); - const url = `http://localhost/api/v1/messages/`; + const url = `${process.env.NEXT_PUBLIC_API_URL}messages/`; try { const response = await fetch(url, { @@ -41,7 +41,7 @@ export async function fetchAboutus() { const headers: HeadersInit = { accept: "application/json" }; - const url = `${process.env.api_url}aboutUs`; + const url = `${process.env.NEXT_PUBLIC_API_URL}aboutUs/`; console.log('Fetching from URL:', url); try { const response = await fetch(url, { headers }); @@ -67,7 +67,7 @@ export async function fetchCourses() { accept: "application/json" }; - const url = `${process.env.api_url}course/?skip=0&limit=100`; + const url = `${process.env.NEXT_PUBLIC_API_URL}course/?skip=0&limit=100`; console.log('Fetching from URL:', url); try { @@ -83,7 +83,11 @@ export async function fetchCourses() { info_images: course?.info_images?.sort((a: any, b: any) => a.index - b.index), })); - return coursesArray; + const sortedCoursesArray = coursesArray.sort((a, b) => + new Date(a.created_at).getTime() - new Date(b.created_at).getTime() + ); + + return sortedCoursesArray; } catch (error) { console.error('Fetch error:', error); throw error; @@ -95,7 +99,7 @@ export async function fetchCourse(id: string) { accept: "application/json" }; - const url = `${process.env.api_url}course/${id}`; + const url = `${process.env.NEXT_PUBLIC_API_URL}course/${id}/`; console.log('Fetching from URL:', url); try { @@ -120,7 +124,7 @@ export async function fetchSettings() { const headers: HeadersInit = { accept: "application/json" }; - const url = `${process.env.api_url}setting`; + const url = `${process.env.NEXT_PUBLIC_API_URL}setting/`; console.log('Fetching from URL:', url); try { const response = await fetch(url, { headers });