fix build

This commit is contained in:
CanbiZ 2026-01-19 10:31:54 +01:00
parent 8d23d5d481
commit e58bfe4f7e
3 changed files with 21 additions and 14 deletions

View File

@ -8,7 +8,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
APP="AFFiNE"
var_tags="${var_tags:-knowledge;notes;workspace}"
var_cpu="${var_cpu:-4}"
var_ram="${var_ram:-8192}"
var_ram="${var_ram:-12288}"
var_disk="${var_disk:-20}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
@ -48,19 +48,19 @@ function update_script() {
set -a && source /opt/affine/.env && set +a
$STD corepack enable
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
export VITE_CORE_COMMIT_SHA=$(get_latest_github_release "toeverything/AFFiNE")
$STD corepack enable
$STD corepack prepare yarn@stable --activate
$STD yarn config set enableTelemetry 0
$STD yarn install
$STD yarn affine build
msg_ok "Rebuilt Application"
msg_info "Running Migrations"
cd /opt/affine/packages/backend/server
$STD node ./scripts/self-host-predeploy.js
msg_ok "Ran Migrations"
$STD yarn affine init
$STD yarn affine build -p @affine/server-native
$STD yarn affine build -p @affine/reader --deps
$STD yarn affine build -p @affine/server --deps
export NODE_OPTIONS=--max-old-space-size=6144
$STD yarn affine build -p @affine/web --deps
msg_info "Restoring Data"
cp -r /root/.affine_storage_backup/. /root/.affine/storage/ 2>/dev/null || true
cp -r /root/.affine_config_backup/. /root/.affine/config/ 2>/dev/null || true

View File

@ -20,7 +20,7 @@
"script": "ct/affine.sh",
"resources": {
"cpu": 4,
"ram": 8192,
"ram": 12288,
"hdd": 20,
"os": "Debian",
"version": "13"

View File

@ -48,7 +48,7 @@ DATABASE_URL=postgresql://${PG_DB_USER}:${PG_DB_PASS}@localhost:5432/${PG_DB_NAM
REDIS_SERVER_HOST=localhost
REDIS_SERVER_PORT=6379
AFFINE_INDEXER_ENABLED=false
NODE_OPTIONS=--max-old-space-size=4096
NODE_OPTIONS=--max-old-space-size=6144
SECRET_KEY=${SECRET_KEY}
EOF
msg_ok "Configured Environment"
@ -60,12 +60,19 @@ export PATH="/root/.cargo/bin:$PATH"
set -a && source /opt/affine/.env && set +a
$STD corepack enable
export COREPACK_ENABLE_DOWNLOAD_PROMPT=0
export VITE_CORE_COMMIT_SHA="v0.25.7"
$STD corepack enable
$STD corepack prepare yarn@stable --activate
$STD yarn config set enableTelemetry 0
$STD yarn install
$STD yarn affine build
$STD yarn affine init
$STD yarn affine build -p @affine/server-native
$STD yarn affine build -p @affine/reader --deps
$STD yarn affine build -p @affine/server --deps
export NODE_OPTIONS=--max-old-space-size=6144
$STD yarn affine build -p @affine/web --deps
msg_ok "Built AFFiNE"
msg_info "Running Initial Migration"