Compare commits

...
3 Commits
Author SHA1 Message Date
LeoVasanko 697a9416e8 Bump mediapreview version. 2026-08-13 06:58:10 +00:00
LeoVasanko d005ae1d88 Remove vestigial docker-compose.yml
OnlyOffice setup is done entirely by mediapreview (cista --oosetup ->
mediapreview.office.setup_docker: image build, oonet network creation,
docker run). Nothing referenced this compose file; it was a leftover
from before the preview functionality moved to the mediapreview package.
2026-08-13 06:55:37 +00:00
LeoVasanko 3d8e20de8f onlyoffice: isolated oonet network in compose; print JWT secret from --oosetup
- docker-compose: attach the OnlyOffice container to the internal-only
  oonet network (fixed name matching mediapreview's OO_NETWORK, fixed
  container IP 172.30.0.2); no published ports, no outbound internet.
- --oosetup prints ONLYOFFICE_JWT_SECRET=<key> at the end regardless of
  build outcome (the secret is deterministically derived from config).
2026-08-13 06:53:46 +00:00
3 changed files with 10 additions and 30 deletions
+9 -1
View File
@@ -6,6 +6,7 @@ only bridges cista's config-derived JWT secret into it and wires the
"""
import os
import sys
from pathlib import Path
import mediapreview.office
@@ -36,4 +37,11 @@ def setup_docker(confdir: Path | None = None) -> str:
}
)
configure()
return mediapreview.office.setup_docker()
try:
return mediapreview.office.setup_docker()
finally:
# Print regardless of build outcome: the secret is deterministic
# (derived from the config).
sys.stdout.write(
f"ONLYOFFICE_JWT_SECRET={os.environ['ONLYOFFICE_JWT_SECRET']}\n"
)
-28
View File
@@ -1,28 +0,0 @@
services:
onlyoffice:
build:
context: ./mediapreview/mediapreview/docker
args:
ONLYOFFICE_VERSION: "9.3.1"
container_name: onlyoffice
ports:
- "8080:80"
environment:
# Number of converter workers (default 8).
# Set to your CPU count or slightly below.
- WORKERS
# JWT secret shared with Cista.
# OnlyOffice reads it as JWT_SECRET; Cista reads it as ONLYOFFICE_JWT_SECRET.
# We use ONLYOFFICE_JWT_SECRET as the canonical name so you only set one variable.
- JWT_SECRET=${ONLYOFFICE_JWT_SECRET}
- JWT_ENABLED=true
- JWT_HEADER=Authorization
volumes:
# Persist fonts and generated caches across restarts
- onlyoffice-data:/var/www/onlyoffice/Data
- onlyoffice-lib:/var/lib/onlyoffice
restart: unless-stopped
volumes:
onlyoffice-data:
onlyoffice-lib:
+1 -1
View File
@@ -33,7 +33,7 @@ dependencies = [
"html5tagger>=1.3.0",
"httpx>=0.28.0",
"inotify>=0.2.12",
"mediapreview[standard]>=0.2.0",
"mediapreview[standard]>=0.2.2",
"msgspec>=0.19.0",
"natsort>=8.4.0",
"numpy>=2.3.2",