Skip to content

Commit 2c87a6c

Browse files
authored
Merge pull request #291 from C4illin/trixie-test
2 parents 6dc6067 + 254509d commit 2c87a6c

File tree

3 files changed

+35
-38
lines changed

3 files changed

+35
-38
lines changed

Dockerfile

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
FROM oven/bun:1.2.2-alpine AS base
1+
FROM debian:trixie-slim AS base
22
LABEL org.opencontainers.image.source="https://github.com/C4illin/ConvertX"
33
WORKDIR /app
44

5+
# install bun
6+
ENV BUN_INSTALL=/etc/.bun
7+
ENV PATH=$BUN_INSTALL/bin:$PATH
8+
ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0
9+
RUN apt-get update && apt-get install -y \
10+
curl \
11+
unzip \
12+
&& rm -rf /var/lib/apt/lists/*
13+
RUN curl -fsSL https://bun.sh/install | bash -s "bun-v1.2.2"
14+
515
# install dependencies into temp directory
616
# this will cache them and speed up future builds
717
FROM base AS install
@@ -14,12 +24,6 @@ RUN mkdir -p /temp/prod
1424
COPY package.json bun.lock /temp/prod/
1525
RUN cd /temp/prod && bun install --frozen-lockfile --production
1626

17-
FROM base AS builder
18-
RUN apk --no-cache add curl gcc
19-
ENV PATH=/root/.cargo/bin:$PATH
20-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
21-
RUN cargo install resvg
22-
2327
FROM base AS prerelease
2428
WORKDIR /app
2529
COPY --from=install /temp/dev/node_modules node_modules
@@ -31,38 +35,31 @@ RUN bun run build
3135
# copy production dependencies and source code into final image
3236
FROM base AS release
3337

34-
RUN apk --no-cache add libheif-tools --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community/
35-
3638
# install additional dependencies
37-
RUN apk --no-cache add \
38-
pandoc \
39-
texlive \
40-
texlive-xetex \
41-
texmf-dist-latexextra \
39+
RUN apt-get update && apt-get install -y \
40+
assimp-utils \
41+
calibre \
42+
dcraw \
4243
ffmpeg \
43-
graphicsmagick \
4444
ghostscript \
45-
vips-tools \
46-
vips-poppler \
47-
vips-jxl \
48-
vips-heif \
49-
vips-magick \
50-
libjxl-tools \
51-
assimp \
45+
graphicsmagick \
5246
inkscape \
47+
libheif-examples \
48+
libjxl-tools \
49+
libva2 \
50+
libvips-tools \
51+
pandoc \
5352
poppler-utils \
54-
gcompat \
55-
libva-utils \
56-
py3-numpy \
57-
potrace
58-
59-
# RUN apk --no-cache add calibre@testing --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main/
60-
61-
# this might be needed for some latex use cases, will add it if needed.
62-
# texmf-dist-fontsextra \
53+
potrace \
54+
python3-numpy \
55+
resvg \
56+
texlive \
57+
texlive-latex-extra \
58+
texlive-xetex \
59+
--no-install-recommends \
60+
&& rm -rf /var/lib/apt/lists/*
6361

6462
COPY --from=install /temp/prod/node_modules node_modules
65-
COPY --from=builder /root/.cargo/bin/resvg /usr/local/bin/resvg
6663
COPY --from=prerelease /app/public/generated.css /app/public/
6764
COPY . .
6865

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ A self-hosted online file converter. Supports over a thousand different formats.
3131
| [Vips](https://github.com/libvips/libvips) | Images | 45 | 23 |
3232
| [libheif](https://github.com/strukturag/libheif) | HEIF | 2 | 4 |
3333
| [XeLaTeX](https://tug.org/xetex/) | LaTeX | 1 | 1 |
34+
| [Calibre](https://calibre-ebook.com/) | E-books | 26 | 19 |
3435
| [Pandoc](https://pandoc.org/) | Documents | 43 | 65 |
3536
| [GraphicsMagick](http://www.graphicsmagick.org/) | Images | 167 | 130 |
3637
| [Inkscape](https://inkscape.org/) | Vector images | 7 | 17 |
3738
| [Assimp](https://github.com/assimp/assimp) | 3D Assets | 77 | 23 |
3839
| [FFmpeg](https://ffmpeg.org/) | Video | ~472 | ~199 |
3940
| [Potrace](https://potrace.sourceforge.net/) | Raster to vector | 4 | 11 |
4041

41-
<!-- | [Calibre](https://calibre-ebook.com/) | E-books | 26 | 19 | -->
4242

4343
<!-- many ffmpeg fileformats are duplicates -->
4444

src/converters/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { convert as convertPandoc, properties as propertiesPandoc } from "./pand
88
import { convert as convertresvg, properties as propertiesresvg } from "./resvg";
99
import { convert as convertImage, properties as propertiesImage } from "./vips";
1010
import { convert as convertxelatex, properties as propertiesxelatex } from "./xelatex";
11-
// import { convert as convertCalibre, properties as propertiesCalibre } from "./calibre";
11+
import { convert as convertCalibre, properties as propertiesCalibre } from "./calibre";
1212
import { convert as convertLibheif, properties as propertiesLibheif } from "./libheif";
1313
import { convert as convertpotrace, properties as propertiespotrace } from "./potrace";
1414

@@ -63,10 +63,10 @@ const properties: Record<
6363
properties: propertiesxelatex,
6464
converter: convertxelatex,
6565
},
66-
// calibre: {
67-
// properties: propertiesCalibre,
68-
// converter: convertCalibre,
69-
// },
66+
calibre: {
67+
properties: propertiesCalibre,
68+
converter: convertCalibre,
69+
},
7070
pandoc: {
7171
properties: propertiesPandoc,
7272
converter: convertPandoc,

0 commit comments

Comments
 (0)