From 9203980a8cafa1115737ecf20520e41a877271b6 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Tue, 27 Feb 2024 23:13:13 +0800 Subject: [PATCH] build: fix selfhost config --- .github/deployment/self-host/compose.yaml | 4 ++-- .../src/components/blocksuite/block-suite-editor/specs.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/deployment/self-host/compose.yaml b/.github/deployment/self-host/compose.yaml index fa95f5bd32..16abda5e5e 100644 --- a/.github/deployment/self-host/compose.yaml +++ b/.github/deployment/self-host/compose.yaml @@ -1,6 +1,6 @@ services: affine: - image: ghcr.io/toeverything/affine-graphql:beta + image: ghcr.io/toeverything/affine-graphql:stable container_name: affine_selfhosted command: ['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js'] @@ -23,7 +23,7 @@ services: max-size: '1000m' restart: unless-stopped environment: - - NODE_OPTIONS=--es-module-specifier-resolution node + - NODE_OPTIONS=--es-module-specifier-resolution=node - AFFINE_CONFIG_PATH=/root/.affine/config - REDIS_SERVER_HOST=redis - DATABASE_URL=postgres://affine:affine@postgres:5432/affine diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs.ts b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs.ts index e6ad8c8c67..284543530c 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs.ts +++ b/packages/frontend/core/src/components/blocksuite/block-suite-editor/specs.ts @@ -21,12 +21,12 @@ class CustomAttachmentService extends AttachmentService { } function customLoadFonts(service: PageService): void { - const officialDomains = new Set(['affine.pro', 'affine.fail']); + const officialDomains = new Set(['app.affine.pro', 'affine.fail']); if (!officialDomains.has(window.location.host)) { const fonts = CanvasTextFonts.map(font => ({ ...font, // self-hosted fonts are served from /assets - url: '/assets' + new URL(font.url).pathname.split('/').pop(), + url: '/assets/' + new URL(font.url).pathname.split('/').pop(), })); service.fontLoader.load(fonts); } else {