Implement Paperjet updates
This commit is contained in:
parent
5e19b78259
commit
4569dea864
19 changed files with 1622 additions and 151 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -12,6 +12,23 @@ RUN npm ci --legacy-peer-deps
|
|||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# PyMuPDF embeds TrueType/OpenType fonts, while the browser packages ship
|
||||
# WOFF2 files. Convert the exact browser assets so exported text and typed
|
||||
# signatures use the same glyph metrics as the Fabric preview.
|
||||
FROM python:3.12-slim AS frontend-fonts
|
||||
|
||||
RUN pip install --no-cache-dir fonttools brotli
|
||||
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/outfit /fontsource/outfit
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/plus-jakarta-sans /fontsource/plus-jakarta-sans
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/allura /fontsource/allura
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/caveat /fontsource/caveat
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/dancing-script /fontsource/dancing-script
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/great-vibes /fontsource/great-vibes
|
||||
COPY --from=frontend-build /frontend/node_modules/@fontsource/sacramento /fontsource/sacramento
|
||||
COPY scripts/convert_frontend_fonts.py /usr/local/bin/convert-frontend-fonts.py
|
||||
RUN python /usr/local/bin/convert-frontend-fonts.py /fontsource /web-fonts
|
||||
|
||||
# The runtime image contains both public-facing nginx and the loopback-only
|
||||
# FastAPI/uvicorn process. This keeps deployment to one container while
|
||||
# preserving the existing nginx -> API boundary.
|
||||
|
|
@ -40,6 +57,7 @@ COPY backend/app ./app
|
|||
RUN pip install --no-cache-dir .
|
||||
|
||||
COPY --from=frontend-build /frontend/dist /usr/share/nginx/html
|
||||
COPY --from=frontend-fonts /web-fonts /app/app/assets/fonts/web
|
||||
COPY frontend/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY docker-entrypoint.sh /usr/local/bin/paperjet-entrypoint
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue