From df2f60dc1c6a47a6cec0d96174c900666b61d917 Mon Sep 17 00:00:00 2001 From: oom Date: Fri, 6 Nov 2026 16:42:29 +0700 Subject: [PATCH] fix page not update(cached) in container, add volume for testing. --- app/tmpl/page.tsx | 11 +++++++---- docker-compose.yml | 5 +++++ public/tmpl/dl.html | 27 --------------------------- 3 files changed, 12 insertions(+), 31 deletions(-) delete mode 100644 public/tmpl/dl.html diff --git a/app/tmpl/page.tsx b/app/tmpl/page.tsx index 4cdb892..387133e 100644 --- a/app/tmpl/page.tsx +++ b/app/tmpl/page.tsx @@ -1,4 +1,6 @@ -// app/page.tsx +export const dynamic = 'force-dynamic' +export const revalidate = 0; + import fs from 'fs'; import path from 'path'; import Link from "next/link"; @@ -6,8 +8,8 @@ import TmplHome from "@/components/TmplHome"; import { DropdownData } from '@/components/utils/DependentDropdown'; import { ToyBrick, FilePenLine, Rocket, Workflow, NotepadTextDashed, - Files, Blocks, FileQuestionMark, ShieldLock, FileUp, GitMerge, - ExternalLink, FileText + Blocks, FileQuestionMark, ShieldLock, FileUp, GitMerge, + FileText } from "lucide-react"; export default function HomePage() { @@ -35,7 +37,8 @@ export default function HomePage() { .filter(json => json.startsWith(key)) .map(json => json.replace('.json', '')); - templateData[key] = matchedJsons.length > 0 ? matchedJsons : ['default']; + templateData[key] = matchedJsons + // templateData[key] = matchedJsons.length > 0 ? matchedJsons : ['default']; }); return ( diff --git a/docker-compose.yml b/docker-compose.yml index 8b365bf..7fd8ac8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,10 @@ services: - DOCX_WORKERS=4 - NOTE_SSO_DEV_MINT=1 ## dev + volumes: + - ecourt-note-uploads:/app/public/note/uploads + - ./public/tmpl:/app/public/tmpl:ro + ports: - "3000:3000" depends_on: @@ -102,6 +106,7 @@ services: volumes: # pin ชื่อจริงไม่มี prefix _ ของ compose ให้ตรงชื่อวอลุ่มจาก docker run เดิม + ecourt-note-uploads: {} judes-note-db-data: name: judes-note-db-data judes-note-minio-data: diff --git a/public/tmpl/dl.html b/public/tmpl/dl.html deleted file mode 100644 index dc09ba0..0000000 --- a/public/tmpl/dl.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Test Download DOCX a - - -

A a Get

- T_no_warning_john_xxx.docx
- TF_no_warning_P2_john_xxx.docx
- TS_P2_IN_john_xxx.docx
- - T12_b2_IN_john_xxx.docx
- T12_FD155_3s-long_john_xxx.docx
- -

Template & Data

- Template: T_X.docx,   - T12_X.docx
- Data: TF_no_warning_P2.json,   - T_no_warning.json,   - TS_P2_IN.json
- T12_b2_IN.json,   - T12_FD155_3s-long.json - - - \ No newline at end of file