feat: add ktx2 texture fallback flow

This commit is contained in:
Tom Boullay
2026-05-17 16:18:17 +02:00
parent 81c513ee1f
commit 3cfb3a21a9
8 changed files with 390 additions and 30 deletions
+13 -2
View File
@@ -24,15 +24,26 @@ RUN npm run build
# --- Stage 3: Production -----------------------------------------------------
FROM node:20-slim AS runner
ARG KTX_SOFTWARE_VERSION=4.4.2
LABEL maintainer="La Fabrik Durable"
LABEL description="Secure GLTF upload interface with Draco compression and Git push"
LABEL description="Secure GLTF upload interface with Draco/KTX2 compression and Git push"
# Blender is required for server-side Draco GLB export.
# KTX-Software provides toktx for optional KTX2 texture delivery.
RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2 \
blender \
ca-certificates \
tini \
curl \
&& rm -rf /var/lib/apt/lists/*
&& curl -fsSL \
"https://github.com/KhronosGroup/KTX-Software/releases/download/v${KTX_SOFTWARE_VERSION}/KTX-Software-${KTX_SOFTWARE_VERSION}-Linux-x86_64.tar.bz2" \
-o /tmp/ktx-software.tar.bz2 \
&& mkdir -p /opt/ktx-software \
&& tar -xjf /tmp/ktx-software.tar.bz2 -C /opt/ktx-software --strip-components=1 \
&& ln -s /opt/ktx-software/bin/toktx /usr/local/bin/toktx \
&& rm -rf /tmp/ktx-software.tar.bz2 /var/lib/apt/lists/*
WORKDIR /app