diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..78aef6e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +node_modules +.svelte-kit +build +server/target +typst +preview +.git +.vscode diff --git a/Dockerfile b/Dockerfile index 8752f77..e709a0e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,15 @@ FROM node:20-alpine AS frontend-builder WORKDIR /app COPY package*.json ./ -RUN npm ci +RUN npm i COPY . . RUN npm run build # Build Backend -FROM rust:1.82-alpine AS backend-builder +FROM rust:alpine AS backend-builder WORKDIR /app -RUN apk add --no-cache musl-dev sqlite-dev openssl-dev pkgconfig -COPY typst/ typst/ +RUN apk add --no-cache musl-dev sqlite-dev openssl-dev pkgconfig git +RUN git clone -b v0.14.2 --single-branch https://github.com/typst/typst.git typst COPY server/Cargo.* server/ COPY server/src server/src WORKDIR /app/server diff --git a/server/Cargo.toml b/server/Cargo.toml index 8fcc6a0..a21dc91 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -21,7 +21,7 @@ futures-util = "0.3" ecow = "0.2" typst = { version = "0.14.2", path = "../typst/crates/typst" } -typst-kit = { path = "../typst/crates/typst-kit", features = ["system-downloader", "system-packages", "embedded-fonts"] } +typst-kit = { path = "../typst/crates/typst-kit", features = ["downloads", "packages", "embed-fonts"] } typst-layout = { path = "../typst/crates/typst-layout" } typst-pdf = { path = "../typst/crates/typst-pdf" } typst-render = { path = "../typst/crates/typst-render" }