فهرست منبع

fix: Docker build in CI (#8312)

* Fix Docker build CI
* Bump nginx-alpine version to 1.27
Márk Tolmács 11 ماه پیش
والد
کامیت
8d530cf102
5فایلهای تغییر یافته به همراه10 افزوده شده و 10 حذف شده
  1. 1 0
      .dockerignore
  2. 1 1
      Dockerfile
  3. 3 3
      excalidraw-app/vite.config.mts
  4. 3 3
      scripts/woff2/woff2-vite-plugins.js
  5. 2 3
      vitest.config.mts

+ 1 - 0
.dockerignore

@@ -8,6 +8,7 @@
 !package.json
 !public/
 !packages/
+!scripts/
 !tsconfig.json
 !yarn.lock
 

+ 1 - 1
Dockerfile

@@ -12,7 +12,7 @@ ARG NODE_ENV=production
 
 RUN yarn build:app:docker
 
-FROM nginx:1.24-alpine
+FROM nginx:1.27-alpine
 
 COPY --from=build /opt/node_app/excalidraw-app/build /usr/share/nginx/html
 

+ 3 - 3
excalidraw-app/vite.config.mts

@@ -26,10 +26,10 @@ export default defineConfig({
         assetFileNames(chunkInfo) {
           if (chunkInfo?.name?.endsWith(".woff2")) {
             // put on root so we are flexible about the CDN path
-            return '[name]-[hash][extname]';
+            return "[name]-[hash][extname]";
           }
 
-          return 'assets/[name]-[hash][extname]';
+          return "assets/[name]-[hash][extname]";
         },
         // Creating separate chunk for locales except for en and percentages.json so they
         // can be cached at runtime and not merged with
@@ -44,7 +44,7 @@ export default defineConfig({
             // Taking the substring after "locales/"
             return `locales/${id.substring(index + 8)}`;
           }
-        }
+        },
       },
     },
     sourcemap: true,

+ 3 - 3
scripts/woff2/woff2-vite-plugins.js

@@ -58,7 +58,7 @@ module.exports.woff2BrowserPlugin = () => {
         style: normal;
         display: swap;
       }
-      
+
       @font-face {
         font-family: "Assistant";
         src: url(${OSS_FONTS_CDN}Assistant-Medium-DrcxCXg3.woff2)
@@ -68,7 +68,7 @@ module.exports.woff2BrowserPlugin = () => {
         style: normal;
         display: swap;
       }
-      
+
       @font-face {
         font-family: "Assistant";
         src: url(${OSS_FONTS_CDN}Assistant-SemiBold-SCI4bEL9.woff2)
@@ -78,7 +78,7 @@ module.exports.woff2BrowserPlugin = () => {
         style: normal;
         display: swap;
       }
-      
+
       @font-face {
         font-family: "Assistant";
         src: url(${OSS_FONTS_CDN}Assistant-Bold-gm-uSS1B.woff2)

+ 2 - 3
vitest.config.mts

@@ -2,9 +2,8 @@ import { defineConfig } from "vitest/config";
 import { woff2BrowserPlugin } from "./scripts/woff2/woff2-vite-plugins";
 
 export default defineConfig({
-  plugins: [
-    woff2BrowserPlugin(),
-  ],
+  // @ts-ignore
+  plugins: [woff2BrowserPlugin()],
   test: {
     setupFiles: ["./setupTests.ts"],
     globals: true,