-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
48 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
.svelte-kit | ||
build | ||
node_modules | ||
node_modules | ||
*.sqlite* | ||
faccina* | ||
.gitignore | ||
docker/* | ||
*.sh | ||
!build.sh | ||
compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,6 +187,4 @@ config.toml | |
docker-compose.yaml | ||
|
||
compile | ||
faccina | ||
faccina.tar.gz | ||
faccina.zip | ||
faccina* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
bun install && bun run build && \ | ||
rm -rf compile && mkdir compile && \ | ||
bun install && bun run build && | ||
rm -rf compile && mkdir compile && | ||
bunx make-vfs --dir ./build/client --content-format import-bunfile --outfile compile/client-routes.ts && | ||
bun ./embed-sharp.ts && | ||
bun build --outfile faccina --minify --sourcemap --compile ./entrypoint.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
docker buildx build --platform=linux/amd64,linux/arm64 -f ./docker/Dockerfile-compile-linux -o compile . && | ||
mv compile/linux_amd64/faccina faccina-linux-amd64 && | ||
mv compile/linux_arm64/faccina faccina-linux-arm64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM ubuntu:focal AS build | ||
WORKDIR /build | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=locked \ | ||
--mount=target=/var/cache/apt,type=cache,sharing=locked \ | ||
rm -f /etc/apt/apt.conf.d/docker-clean \ | ||
&& apt-get update \ | ||
&& apt-get -y --no-install-recommends install \ | ||
unzip curl build-essential ninja-build python3-pip bc wget libfftw3-dev libopenexr-dev libgsf-1-dev libglib2.0-dev liborc-dev libopenslide-dev libmatio-dev libwebp-dev libjpeg-turbo8-dev libexpat1-dev libexif-dev libtiff5-dev libcfitsio-dev libpoppler-glib-dev librsvg2-dev libpango1.0-dev libopenjp2-7-dev liblcms2-dev libimagequant-dev | ||
RUN pip3 install meson | ||
RUN wget https://github.com/libvips/libvips/archive/refs/heads/master.zip && unzip master.zip | ||
WORKDIR /build/libvips-master | ||
RUN meson setup build --libdir=lib --buildtype=release --wipe | ||
RUN cd build && meson compile && meson install | ||
RUN ldconfig | ||
|
||
WORKDIR /app | ||
RUN curl -fsSL https://bun.sh/install | bash | ||
COPY package.json bun.lockb ./ | ||
COPY patches ./patches | ||
RUN --mount=target=/root/.bun/install/cache,type=cache \ | ||
PATH="/root/.bun/bin:$PATH" SHARP_FORCE_GLOBAL_LIBVIPS=1 bun install --frozen-lockfile --verbose | ||
|
||
COPY . . | ||
RUN PATH="/root/.bun/bin:$PATH" ./build.sh | ||
|
||
FROM scratch | ||
COPY --from=build /app/faccina /faccina | ||
ENTRYPOINT [ "/faccina" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters