Files
server-scripts/haven-notify/Dockerfile
Jose Henrique 18272f15a6
Some checks failed
Check scripts syntax / check-scripts-syntax (push) Successful in 9s
Haven Notify Build and Deploy / Deploy Haven Notify (internal) (push) Has been cancelled
Haven Notify Build and Deploy / Build Haven Notify Image (push) Has been cancelled
forgot copy
2025-08-23 21:29:46 -03:00

21 lines
541 B
Docker

# Start from the official Golang image for building
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder
ARG TARGETARCH
ARG TARGETOS
WORKDIR /app
COPY . .
# Build statically for Linux
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o haven-notify main.go
# Use Alpine for running, with CA certificates for TLS
FROM alpine:latest
WORKDIR /app
RUN apk --no-cache add ca-certificates
COPY templates/ templates/
COPY --from=builder /app/haven-notify .
EXPOSE 8080
ENV WEBHOOK_URL=""
ENTRYPOINT ["/app/haven-notify"]