diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index e965b5b..9ffd180 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -20,8 +20,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Log in to Container Registry uses: docker/login-action@v3 diff --git a/.gitignore b/.gitignore index a1b74ea..0234a98 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ excalidraw-complete node_modules .env *.env -*/*.env diff --git a/excalidraw-complete.Dockerfile b/excalidraw-complete.Dockerfile index f6ecc60..6fbeb26 100644 --- a/excalidraw-complete.Dockerfile +++ b/excalidraw-complete.Dockerfile @@ -1,16 +1,10 @@ # 前端构建阶段 FROM node:18 AS frontend-builder WORKDIR /app -# 安装 patch 工具 -RUN apt-get update && apt-get install -y patch # 复制 excalidraw 子模块 COPY excalidraw/ ./excalidraw/ -# 复制补丁文件 -COPY frontend.patch ./ -# 应用前端补丁 -RUN cd excalidraw && patch -p1 < ../frontend.patch # 构建前端 -RUN cd excalidraw && npm install && cd excalidraw-app && npm run build:app:docker +RUN cd excalidraw && pnpm install && cd excalidraw-app && pnpm build:app:docker # 后端构建阶段 FROM golang:alpine AS backend-builder diff --git a/excalidraw/.env.production b/excalidraw/.env.production index 0c71585..26a13ba 100644 --- a/excalidraw/.env.production +++ b/excalidraw/.env.production @@ -1,17 +1,17 @@ -VITE_APP_BACKEND_V2_GET_URL=https://json.excalidraw.com/api/v2/ -VITE_APP_BACKEND_V2_POST_URL=https://json.excalidraw.com/api/v2/post/ +VITE_APP_BACKEND_V2_GET_URL=http://localhost:3002/api/v2/ +VITE_APP_BACKEND_V2_POST_URL=http://localhost:3002/api/v2/post/ VITE_APP_LIBRARY_URL=https://libraries.excalidraw.com -VITE_APP_LIBRARY_BACKEND=https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries +VITE_APP_LIBRARY_BACKEND=http://localhost:3002/libraries -VITE_APP_PLUS_LP=https://plus.excalidraw.com -VITE_APP_PLUS_APP=https://app.excalidraw.com +VITE_APP_PLUS_LP=http://localhost:3002/plus/ +VITE_APP_PLUS_APP=http://localhost:3002/app/ -VITE_APP_AI_BACKEND=https://oss-ai.excalidraw.com +VITE_APP_AI_BACKEND=http://localhost:3002/ai/ # socket server URL used for collaboration -VITE_APP_WS_SERVER_URL=https://oss-collab.excalidraw.com +VITE_APP_WS_SERVER_URL=http://localhost:3002 -VITE_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"excalidraw-room-persistence.firebaseapp.com","databaseURL":"https://excalidraw-room-persistence.firebaseio.com","projectId":"excalidraw-room-persistence","storageBucket":"excalidraw-room-persistence.appspot.com","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}' +VITE_APP_FIREBASE_CONFIG='{"apiKey":"AIzaSyAd15pYlMci_xIp9ko6wkEsDzAAA0Dn0RU","authDomain":"","databaseURL":"","projectId":"excalidraw-room-persistence","storageBucket":"","messagingSenderId":"654800341332","appId":"1:654800341332:web:4a692de832b55bd57ce0c1"}' -VITE_APP_DISABLE_TRACKING= +VITE_APP_DISABLE_TRACKING=yes diff --git a/excalidraw/.husky/pre-commit b/excalidraw/.husky/pre-commit deleted file mode 100644 index ab2a5ac..0000000 --- a/excalidraw/.husky/pre-commit +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -# yarn lint-staged diff --git a/excalidraw/package.json b/excalidraw/package.json index 17ea780..0dcae17 100644 --- a/excalidraw/package.json +++ b/excalidraw/package.json @@ -39,7 +39,6 @@ "eslint-config-react-app": "7.0.1", "eslint-plugin-prettier": "3.3.1", "http-server": "14.1.1", - "husky": "7.0.4", "jsdom": "22.1.0", "lint-staged": "12.3.7", "pepjs": "0.5.3", @@ -70,7 +69,6 @@ "fix": "pnpm fix:other && pnpm fix:code", "locales-coverage": "node scripts/build-locales-coverage.js", "locales-coverage:description": "node scripts/locales-coverage-description.js", - "prepare": "husky install", "prettier": "prettier \"**/*.{css,scss,json,md,html,yml}\" --ignore-path=.eslintignore", "start": "pnpm --filter excalidraw-app start", "start:app:production": "pnpm build && npx http-server build -a localhost -p 5001 -o", diff --git a/excalidraw/pnpm-lock.yaml b/excalidraw/pnpm-lock.yaml index 0b7e706..592acc7 100644 --- a/excalidraw/pnpm-lock.yaml +++ b/excalidraw/pnpm-lock.yaml @@ -93,9 +93,6 @@ importers: http-server: specifier: 14.1.1 version: 14.1.1 - husky: - specifier: 7.0.4 - version: 7.0.4 jsdom: specifier: 22.1.0 version: 22.1.0 @@ -4419,11 +4416,6 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - husky@7.0.4: - resolution: {integrity: sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==} - engines: {node: '>=12'} - hasBin: true - i18next-browser-languagedetector@6.1.4: resolution: {integrity: sha512-wukWnFeU7rKIWT66VU5i8I+3Zc4wReGcuDK2+kuFhtoxBRGWGdvYI9UQmqNL/yQH1KogWwh+xGEaIPH8V/i2Zg==} @@ -12647,8 +12639,6 @@ snapshots: human-signals@5.0.0: {} - husky@7.0.4: {} - i18next-browser-languagedetector@6.1.4: dependencies: '@babel/runtime': 7.27.6