FROM golang:1.26-alpine AS build
WORKDIR /src
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o /chaosmith-site .

FROM alpine:3.21
RUN apk add --no-cache ca-certificates
WORKDIR /app
COPY --from=build /chaosmith-site .
COPY index.html ABSTRACTS.png ABSTRACTS.webp ./
COPY src/ ./src/
EXPOSE 8000
CMD ["./chaosmith-site"]
