port to fiber v3, optimize static assets serving

This commit is contained in:
Laptop
2024-12-31 16:22:23 +02:00
parent f122c45fec
commit 1d5ec4353e
13 changed files with 176 additions and 92 deletions

View File

@@ -1,4 +1,4 @@
ARG GO_VERSION=1.22.10
ARG GO_VERSION=1.23.4
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION} AS build
ARG TARGETOS
@@ -20,6 +20,7 @@ RUN soundcloakctl js download
RUN templ generate
RUN go generate ./lib/*
RUN soundcloakctl config codegen
RUN soundcloakctl -nozstd -notable precompress
RUN CGO_ENABLED=0 GOARCH=${TARGETARCH} GOOS=${TARGETOS} go build -ldflags "-s -w -extldflags '-static'" -o ./app
RUN echo "soundcloak:x:5000:5000:Soundcloak user:/:/sbin/nologin" > /etc/minimal-passwd && \