fixed some stuff

This commit is contained in:
2026-01-10 21:00:32 +01:00
parent 43c6e90649
commit 9c8f6c42a9
7 changed files with 64 additions and 17 deletions
+10 -7
View File
@@ -1,13 +1,16 @@
FROM golang:alpine as builder
WORKDIR /build
RUN go install github.com/a-h/templ/cmd/templ@latest
COPY . .
RUN templ generate
RUN go build -o iphistory .
FROM ghcr.io/a-h/templ:latest AS generate-stage
COPY . /app
WORKDIR /app
RUN ["templ", "generate"]
FROM golang:alpine AS build-stage
WORKDIR /app
COPY --from=generate-stage /app /app
RUN CGO_ENABLED=0 go build -o iphistory .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app/
COPY --from=builder /build/iphistory .
COPY --from=build-stage /app/iphistory .
EXPOSE 8080
CMD ["./iphistory"]