FROM golang:1.24.2-alpine3.21

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

COPY migrations ./migrations/
COPY *.go ./
COPY *.gohtml ./
RUN go build -o /allowance_planner

EXPOSE 8080
ENV GIN_MODE=release
CMD ["/allowance_planner"]
