From f66b2ac742ef9cde8054552373c10613c3efa2b5 Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 29 May 2026 09:44:28 +0200 Subject: [PATCH] compose tex preamble and install pgn_to_tex from github --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5d36cc..a293b3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ USER opam WORKDIR /app COPY --chown=opam:opam dune-project ./ RUN opam update && opam install -y dune dream +RUN opam pin add -y pgn_to_tex git+https://github.com/TheRealOwenRees/pgn_to_tex.git#v0.0.1-rc.2 COPY --chown=opam:opam . . RUN opam exec -- dune build bin/main.exe @@ -37,13 +38,17 @@ RUN wget --tries=5 https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx. # 3. FIX: Ensure the dynamic path to tlmgr matches whatever year CTAN is currently on ENV PATH="/usr/local/texlive/2026/bin/x86_64-linux:${PATH}" ENV PATH="/usr/local/texlive/2025/bin/x86_64-linux:${PATH}" -ENV PATH="/usr/local/texlive/2024/bin/x86_64-linux:${PATH}" # Fallback to absolute standard binary bin location ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}" -# 3. Install TexLive packages needed for rendering a chess game +# 4. Install TexLive packages needed for rendering a chess game RUN tlmgr install parskip pgf chessboard etoolbox ifmtarg xifthen skaknew lambda-lists xkeyval chessfss skak xskak +#5. Copy preamble source and regenerate the format file +COPY ./preambles ./preambles +RUN cd preambles && pdflatex -ini -jobname="chess" "&pdflatex" chess.tex + +# 6. Copy server binary and static assets COPY --from=builder /app/_build/default/bin/main.exe ./server COPY ./static ./static