diff options
author | Alan Pearce | 2024-04-17 20:29:34 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-17 20:53:45 +0200 |
commit | 347d0cd1a73921a8cbc43798a7fbe2095791bbe9 (patch) | |
tree | da02d4e95345ef34ea319933bb2ba6b43878edc7 | |
parent | 30fed9da228ef9bab5734e000e598ff380cb55f5 (diff) | |
download | website-347d0cd1a73921a8cbc43798a7fbe2095791bbe9.tar.lz website-347d0cd1a73921a8cbc43798a7fbe2095791bbe9.tar.zst website-347d0cd1a73921a8cbc43798a7fbe2095791bbe9.zip |
remove post-processing
-rw-r--r-- | Dockerfile | 17 | ||||
-rw-r--r-- | Makefile | 76 | ||||
-rw-r--r-- | flake.nix | 5 |
3 files changed, 1 insertions, 97 deletions
diff --git a/Dockerfile b/Dockerfile index 3724bf3..3d31306 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,21 +34,6 @@ RUN rm -fr node_modules COPY --from=install /temp/prod/node_modules node_modules RUN bun build src/index.ts --compile --minify --sourcemap --outfile server -FROM alpine:20240329 as postprocess - -RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories - -RUN apk add --no-cache prettier@testing make fd brotli gzip zstd - -WORKDIR /app - -COPY --link Makefile ./ -COPY --link config.toml ./ -COPY --from=build /app/public public - -RUN make format -RUN make -j4 compress - # Final stage for app image FROM gcr.io/distroless/base-nossl @@ -57,7 +42,7 @@ WORKDIR /app # Copy built application COPY config.toml /app/ COPY --from=build /app /app -COPY --from=postprocess /app/public /app/public +COPY --from=build /app/public /app/public # Start the server by default, this can be overwritten at runtime EXPOSE 3000 diff --git a/Makefile b/Makefile index 526c21d..1160176 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,6 @@ .ONESHELL: .DELETE_ON_ERROR: -brotli := @brotli --force --no-copy-stat -gzip := @gzip --best --keep --force -zstd := @zstd --force --no-pass-through -19 --quiet --stdout -pr := @printf "%4s %s\n" - format: .formatstamp .formatstamp: @@ -18,75 +13,4 @@ clean: rm -rf ./public rm -rf ./.*stamp -to_compress := $(shell fd --hidden . public --type=file -e html -e xml -e xsl -e txt -e asc) -brotli_files := $(patsubst %, %.br, $(to_compress)) -gzip_files := $(patsubst %, %.gz, $(to_compress)) -zstd_files := $(patsubst %, %.zst, $(to_compress)) - -%.html.br: %.html - @echo $@ - $(brotli) $< - -%.xml.br: %.xml - @echo $@ - $(brotli) $< - -%.xsl.br: %.xsl - @echo $@ - $(brotli) $< - -%.txt.br: %.txt - @echo $@ - $(brotli) $< - -%.asc.br: %.asc - @echo $@ - $(brotli) $< - -%.html.gz: %.html - @echo $@ - $(gzip) $< - -%.xml.gz: %.xml - @echo $@ - $(gzip) $< - -%.xsl.gz: %.xsl - @echo $@ - $(gzip) $< - -%.txt.gz: %.txt - @echo $@ - $(gzip) $< - -%.asc.gz: %.asc - @echo $@ - $(gzip) $< - -%.html.zst: %.html - @echo $@ - $(zstd) $< > $@ - -%.xml.zst: %.xml - @echo $@ - $(zstd) $< > $@ - -%.xsl.zst: %.xsl - @echo $@ - $(zstd) $< > $@ - -%.txt.zst: %.txt - @echo $@ - $(zstd) $< > $@ - -%.asc.zst: %.asc - @echo $@ - $(zstd) $< > $@ - -compress: .compressstamp - -.compressstamp: .formatstamp $(brotli_files) $(gzip_files) $(zstd_files) - @echo "Compressing output files..." - @touch .compressstamp - .PHONY: all clean format compress diff --git a/flake.nix b/flake.nix index 2faa85b..979dc0f 100644 --- a/flake.nix +++ b/flake.nix @@ -18,11 +18,6 @@ let pkgs = nixpkgs.legacyPackages.${system}; nativeBuildInputs = with pkgs; [ - nodePackages.prettier - fd - brotli - gzip - zstd git go ]; |