FROM golang:1.23-alpine 

WORKDIR /app

RUN apk update \
  && apk add --no-cache build-base \
  && go install github.com/air-verse/air@latest \
  && go install github.com/a-h/templ/cmd/templ@latest

COPY go.mod go.sum ./
RUN go mod download

COPY . .

EXPOSE 8000

CMD [ "air", "-c", ".air.toml" ]
