feat: initial template (Go + Templ + HTMX + CDN Tailwind)
Some checks failed
CD / Lint / Test / Vet (push) Failing after 5s
CD / Build & Import (push) Has been skipped
CD / Deploy via GitOps (push) Has been skipped

This commit is contained in:
Mathias Bergqvist
2026-05-05 08:19:04 +02:00
parent 57c1e460b7
commit a25120cd1d
11 changed files with 270 additions and 2 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM golang:1.26-alpine AS build
WORKDIR /src
RUN apk add --no-cache git
RUN go install github.com/a-h/templ/cmd/templ@latest
COPY go.mod ./
RUN go mod download
COPY . .
RUN templ generate && CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /out/app ./cmd/__PROJECT_NAME__
FROM gcr.io/distroless/static-debian12:nonroot
COPY --from=build /out/app /app
USER nonroot:nonroot
EXPOSE 8080
ENTRYPOINT ["/app"]