Merge pull request #291 from C4illin/trixie-test
This commit is contained in:
commit
2c87a6c8c2
3 changed files with 35 additions and 38 deletions
61
Dockerfile
61
Dockerfile
|
|
@ -1,7 +1,17 @@
|
||||||
FROM oven/bun:1.2.2-alpine AS base
|
FROM debian:trixie-slim AS base
|
||||||
LABEL org.opencontainers.image.source="https://github.com/C4illin/ConvertX"
|
LABEL org.opencontainers.image.source="https://github.com/C4illin/ConvertX"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
# install bun
|
||||||
|
ENV BUN_INSTALL=/etc/.bun
|
||||||
|
ENV PATH=$BUN_INSTALL/bin:$PATH
|
||||||
|
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
unzip \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.2"
|
||||||
|
|
||||||
# install dependencies into temp directory
|
# install dependencies into temp directory
|
||||||
# this will cache them and speed up future builds
|
# this will cache them and speed up future builds
|
||||||
FROM base AS install
|
FROM base AS install
|
||||||
|
|
@ -14,12 +24,6 @@ RUN mkdir -p /temp/prod
|
||||||
COPY package.json bun.lock /temp/prod/
|
COPY package.json bun.lock /temp/prod/
|
||||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||||
|
|
||||||
FROM base AS builder
|
|
||||||
RUN apk --no-cache add curl gcc
|
|
||||||
ENV PATH=/root/.cargo/bin:$PATH
|
|
||||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
|
||||||
RUN cargo install resvg
|
|
||||||
|
|
||||||
FROM base AS prerelease
|
FROM base AS prerelease
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=install /temp/dev/node_modules node_modules
|
COPY --from=install /temp/dev/node_modules node_modules
|
||||||
|
|
@ -31,38 +35,31 @@ RUN bun run build
|
||||||
# copy production dependencies and source code into final image
|
# copy production dependencies and source code into final image
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
|
|
||||||
RUN apk --no-cache add libheif-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/
|
|
||||||
|
|
||||||
# install additional dependencies
|
# install additional dependencies
|
||||||
RUN apk --no-cache add \
|
RUN apt-get update && apt-get install -y \
|
||||||
pandoc \
|
assimp-utils \
|
||||||
texlive \
|
calibre \
|
||||||
texlive-xetex \
|
dcraw \
|
||||||
texmf-dist-latexextra \
|
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
graphicsmagick \
|
|
||||||
ghostscript \
|
ghostscript \
|
||||||
vips-tools \
|
graphicsmagick \
|
||||||
vips-poppler \
|
|
||||||
vips-jxl \
|
|
||||||
vips-heif \
|
|
||||||
vips-magick \
|
|
||||||
libjxl-tools \
|
|
||||||
assimp \
|
|
||||||
inkscape \
|
inkscape \
|
||||||
|
libheif-examples \
|
||||||
|
libjxl-tools \
|
||||||
|
libva2 \
|
||||||
|
libvips-tools \
|
||||||
|
pandoc \
|
||||||
poppler-utils \
|
poppler-utils \
|
||||||
gcompat \
|
potrace \
|
||||||
libva-utils \
|
python3-numpy \
|
||||||
py3-numpy \
|
resvg \
|
||||||
potrace
|
texlive \
|
||||||
|
texlive-latex-extra \
|
||||||
# RUN apk --no-cache add calibre@testing --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main/
|
texlive-xetex \
|
||||||
|
--no-install-recommends \
|
||||||
# this might be needed for some latex use cases, will add it if needed.
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
# texmf-dist-fontsextra \
|
|
||||||
|
|
||||||
COPY --from=install /temp/prod/node_modules node_modules
|
COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY --from=builder /root/.cargo/bin/resvg /usr/local/bin/resvg
|
|
||||||
COPY --from=prerelease /app/public/generated.css /app/public/
|
COPY --from=prerelease /app/public/generated.css /app/public/
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ A self-hosted online file converter. Supports over a thousand different formats.
|
||||||
| [Vips](https://github.com/libvips/libvips) | Images | 45 | 23 |
|
| [Vips](https://github.com/libvips/libvips) | Images | 45 | 23 |
|
||||||
| [libheif](https://github.com/strukturag/libheif) | HEIF | 2 | 4 |
|
| [libheif](https://github.com/strukturag/libheif) | HEIF | 2 | 4 |
|
||||||
| [XeLaTeX](https://tug.org/xetex/) | LaTeX | 1 | 1 |
|
| [XeLaTeX](https://tug.org/xetex/) | LaTeX | 1 | 1 |
|
||||||
|
| [Calibre](https://calibre-ebook.com/) | E-books | 26 | 19 |
|
||||||
| [Pandoc](https://pandoc.org/) | Documents | 43 | 65 |
|
| [Pandoc](https://pandoc.org/) | Documents | 43 | 65 |
|
||||||
| [GraphicsMagick](http://www.graphicsmagick.org/) | Images | 167 | 130 |
|
| [GraphicsMagick](http://www.graphicsmagick.org/) | Images | 167 | 130 |
|
||||||
| [Inkscape](https://inkscape.org/) | Vector images | 7 | 17 |
|
| [Inkscape](https://inkscape.org/) | Vector images | 7 | 17 |
|
||||||
|
|
@ -38,7 +39,6 @@ A self-hosted online file converter. Supports over a thousand different formats.
|
||||||
| [FFmpeg](https://ffmpeg.org/) | Video | ~472 | ~199 |
|
| [FFmpeg](https://ffmpeg.org/) | Video | ~472 | ~199 |
|
||||||
| [Potrace](https://potrace.sourceforge.net/) | Raster to vector | 4 | 11 |
|
| [Potrace](https://potrace.sourceforge.net/) | Raster to vector | 4 | 11 |
|
||||||
|
|
||||||
<!-- | [Calibre](https://calibre-ebook.com/) | E-books | 26 | 19 | -->
|
|
||||||
|
|
||||||
<!-- many ffmpeg fileformats are duplicates -->
|
<!-- many ffmpeg fileformats are duplicates -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import { convert as convertPandoc, properties as propertiesPandoc } from "./pand
|
||||||
import { convert as convertresvg, properties as propertiesresvg } from "./resvg";
|
import { convert as convertresvg, properties as propertiesresvg } from "./resvg";
|
||||||
import { convert as convertImage, properties as propertiesImage } from "./vips";
|
import { convert as convertImage, properties as propertiesImage } from "./vips";
|
||||||
import { convert as convertxelatex, properties as propertiesxelatex } from "./xelatex";
|
import { convert as convertxelatex, properties as propertiesxelatex } from "./xelatex";
|
||||||
// import { convert as convertCalibre, properties as propertiesCalibre } from "./calibre";
|
import { convert as convertCalibre, properties as propertiesCalibre } from "./calibre";
|
||||||
import { convert as convertLibheif, properties as propertiesLibheif } from "./libheif";
|
import { convert as convertLibheif, properties as propertiesLibheif } from "./libheif";
|
||||||
import { convert as convertpotrace, properties as propertiespotrace } from "./potrace";
|
import { convert as convertpotrace, properties as propertiespotrace } from "./potrace";
|
||||||
|
|
||||||
|
|
@ -63,10 +63,10 @@ const properties: Record<
|
||||||
properties: propertiesxelatex,
|
properties: propertiesxelatex,
|
||||||
converter: convertxelatex,
|
converter: convertxelatex,
|
||||||
},
|
},
|
||||||
// calibre: {
|
calibre: {
|
||||||
// properties: propertiesCalibre,
|
properties: propertiesCalibre,
|
||||||
// converter: convertCalibre,
|
converter: convertCalibre,
|
||||||
// },
|
},
|
||||||
pandoc: {
|
pandoc: {
|
||||||
properties: propertiesPandoc,
|
properties: propertiesPandoc,
|
||||||
converter: convertPandoc,
|
converter: convertPandoc,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue