9992fb4ef1
Refactor the application to a Go-based architecture for improved performance and maintainability. Replace the Dockerfile to utilize a multi-stage build process, enhancing image efficiency. Implement comprehensive session store tests to ensure reliability and create new OAuth handlers for managing authentication efficiently. Update documentation to reflect these structural changes.
27 lines
462 B
Docker
27 lines
462 B
Docker
FROM golang:1.24 AS build
|
|
|
|
ARG GITLAB_USER
|
|
ARG GITLAB_TOKEN
|
|
|
|
WORKDIR /build
|
|
ENV CGO_ENABLED=0
|
|
ENV GOPRIVATE=gitlab.com/unboundsoftware/*
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN go build -ldflags="-s -w" -o /release/service ./cmd/service
|
|
|
|
FROM gcr.io/distroless/static-debian12
|
|
|
|
ENV TZ=Europe/Stockholm
|
|
ENV AUDIENCE="https://shiny.unbound.se"
|
|
|
|
COPY --from=build /release/service /service
|
|
COPY public /public
|
|
|
|
EXPOSE 3333
|
|
|
|
ENTRYPOINT ["/service"]
|