FROM golang:1.24.3 AS build-stage

WORKDIR /app

COPY . .

RUN go build

FROM gcr.io/distroless/base-debian12 AS build-release-stage

WORKDIR /data

COPY --from=build-stage /app/auth_service /auth_service
COPY users.json /data/users.json
COPY auth_service.config /data/auth_service.config

ENTRYPOINT [ "/auth_service" ]