mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
build: fix selfhost config
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user