Sistemazione setup Haskell + Docker
This commit is contained in:
parent
17b685b93c
commit
e2d4f66ee9
|
@ -0,0 +1,17 @@
|
|||
FROM haskell:9.6-slim AS haskell-builder
|
||||
WORKDIR /opt/site
|
||||
RUN cabal update
|
||||
COPY ./Site.cabal /opt/site/Site.cabal
|
||||
RUN cabal build --only-dependencies -j
|
||||
COPY ./site.hs /opt/site/site.hs
|
||||
RUN cabal install
|
||||
RUN mv $(readlink -f /root/.cabal/bin/site) /opt/site/site
|
||||
|
||||
FROM debian:bookworm
|
||||
WORKDIR /opt/site
|
||||
RUN apt update && apt install -y texlive texlive-luatex texlive-latex-extra texlive-lang-italian latexmk curl git
|
||||
RUN mkdir -p /usr/share/fonts/opentype/alegreya-sans && \
|
||||
curl -fsSL -o - https://github.com/huertatipografica/Alegreya-Sans/archive/refs/tags/v2.008.tar.gz | \
|
||||
tar --strip-components 3 -C /usr/share/fonts/opentype/alegreya-sans -xzf - Alegreya-Sans-2.008/fonts/otf/
|
||||
COPY --from=haskell-builder /opt/site/site /opt/site/site
|
||||
ENTRYPOINT ["/opt/site/site"]
|
|
@ -0,0 +1,16 @@
|
|||
name: Site
|
||||
version: 1.0
|
||||
synopsis: Site builder with Hakyll
|
||||
author: Tito Sacchi
|
||||
build-type: Simple
|
||||
|
||||
executable site
|
||||
build-depends: hakyll >= 4.16 && < 5
|
||||
, base >= 4 && < 5
|
||||
, mtl >= 2 && < 3
|
||||
, filepath >= 1.4 && < 2
|
||||
, process >= 1.6 && < 2
|
||||
, pandoc >= 3.1 && < 4
|
||||
main-is: site.hs
|
||||
hs-source-dirs: .
|
||||
default-language: Haskell2010
|
Loading…
Reference in New Issue