[ci skip] onlyoffice: cache fonts/themes on NFS for fast restarts

Persist font cache (159MB) and theme images (10MB) to NFS volume.
Set GENERATE_FONTS=false to skip regeneration on startup since cache
is warm. Startup time: ~3 min -> 5 seconds.
This commit is contained in:
Viktor Barzin 2026-03-01 18:02:38 +00:00
parent c91eb5c071
commit 678f92ffb4
2 changed files with 20 additions and 0 deletions

Binary file not shown.

View file

@ -142,11 +142,24 @@ resource "kubernetes_deployment" "onlyoffice-document-server" {
name = "JWT_SECRET"
value = var.onlyoffice_jwt_token
}
env {
name = "GENERATE_FONTS"
value = "false"
}
volume_mount {
name = "data"
mount_path = "/var/www/onlyoffice/Data"
}
volume_mount {
name = "font-cache"
mount_path = "/var/www/onlyoffice/documentserver/fonts"
}
volume_mount {
name = "font-cache"
mount_path = "/var/www/onlyoffice/documentserver/sdkjs/common/Images"
sub_path = "images"
}
}
volume {
name = "data"
@ -155,6 +168,13 @@ resource "kubernetes_deployment" "onlyoffice-document-server" {
server = var.nfs_server
}
}
volume {
name = "font-cache"
nfs {
path = "/mnt/main/onlyoffice-cache"
server = var.nfs_server
}
}
}
}
}