diff --git a/app/tmpl/page.tsx b/app/tmpl/page.tsx index 64b7b60..2798a00 100644 --- a/app/tmpl/page.tsx +++ b/app/tmpl/page.tsx @@ -118,12 +118,13 @@ export default function HomePage() {
- 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
+ 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: T_X.docx, T12_X.docx+
+
Unblock-File .\install-word-addins.ps1
-Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force
-.\install-word-addins.ps1 -Install
+ Unblock-File .\install-word-addins.ps1 + Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned -Force + .\install-word-addins.ps1 -Install diff --git a/docker-compose.yml b/docker-compose.yml index f54a618..c2f1cd5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,34 @@ # judes-note-db เก่ารันอยู่ (สร้างด้วย docker run) ให้ `docker rm -f judes-note-db` # ก่อน แล้ว compose จะต่อวอลุ่ม judes-note-db-data เดิมได้เลย ข้อมูลไม่หาย services: + docedit: + build: + context: . + dockerfile: docker/web.Dockerfile + restart: unless-stopped + environment: + - SECRET=${SECRET} + - PRIVATE_KEY_HEX=${PRIVATE_KEY_HEX} + - PUBLIC_KEY_HEX=${PUBLIC_KEY_HEX} + - EXTERNAL_API_KEY=${EXTERNAL_API_KEY} + - DOCVER_API_KEY=${DOCVER_API_KEY} + - DOCVER_TOKEN_SECRET=${DOCVER_TOKEN_SECRET} + - DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/note + ### สำหรับโค้ดตัวอย่างระบบนอกเรียกเข้ามาไม่ได้ใช้ในระบบนี้ ห้ามเอาไช้ + - DOCEDIT_BASE_URL=http://docedit:3000/docedit + - TICKET_SEC=300 + - DOCX_WORKERS=4 + + + ports: + - "3000:3000" + depends_on: + db: + condition: service_healthy + minio: + condition: service_healthy + + db: image: postgres:18-alpine restart: unless-stopped diff --git a/next.config.mjs b/next.config.mjs index 8d37633..3d6b9f9 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -34,7 +34,21 @@ const nextConfig = { ]; }, experimental: { - serverComponentsExternalPackages: ['piscina'] + serverComponentsExternalPackages: ['piscina'], + outputFileTracingIncludes: { + // ปรับ Path ฝั่งซ้ายให้ตรงกับ API Route หรือจุดที่เรียกใช้ Piscina + '/api/**/*': [ + 'node_modules/piscina/**/*', + 'node_modules/pizzip/**/*', + 'node_modules/@xmldom/xmldom/**/*', + 'node_modules/xpath/**/*', + 'node_modules/docx-templates/**/*', + 'node_modules/jszip/**/*', + 'node_modules/setimmediate/**/*', + 'node_modules/pako/**/*', + 'workers/**/*' // Path ที่เก็บไฟล์ worker.js ของคุณ (ปรับตามจริง) + ], + }, } }; diff --git a/public/wordaddin/manifest.template.xml b/public/wordaddin/manifest.template.xml index a51ebb1..c637200 100644 --- a/public/wordaddin/manifest.template.xml +++ b/public/wordaddin/manifest.template.xml @@ -1,22 +1,7 @@