FROM golang:latest as builder

WORKDIR /app

COPY . /app

RUN ls -l

RUN go mod download && go mod tidy

RUN go build -o bin/crawler ./cmd/crawler/main.go 

FROM mcr.microsoft.com/playwright

COPY --from=builder /app/bin/crawler /usr/bin/crawler

CMD ["crawler"]
