FROM golang:1.24-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download

COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -a -o /crawler ./cmd/crawler

FROM alpine:latest
COPY --from=builder /crawler /crawler
COPY config.yaml .

ENTRYPOINT ["/crawler"]