Compare commits

..

No commits in common. "a23642af34d93d705b70d275c537c079a892c23c" and "7b340cc6f4ab4ac9bd688d906e6d139125d54e3e" have entirely different histories.

3 changed files with 8 additions and 21 deletions

View File

@ -1,4 +1,7 @@
.vscode
.git
go.mod
go.sum
*.go
helm
.*ignore

View File

@ -1,35 +1,19 @@
FROM golang:1.18.5 as builder
FROM alpine:3.11.6
ARG GOOS="linux"
ARG GOARCH="amd64"
WORKDIR /workspace
COPY go.mod go.sum /workspace/
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build -a -o hugo-mx-gateway
FROM alpine:3.16.2
ARG RUNTIME_USER="mxgateway"
ARG RUNTIME_USER_UID=4583
RUN apk update && apk add --no-cache ca-certificates
RUN addgroup -g $RUNTIME_USER_UID $RUNTIME_USER && \
adduser --disabled-password --no-create-home --gecos "" \
adduser --disabled-password --no-create-home --gecos "" \
--home /app --ingroup $RUNTIME_USER --uid $RUNTIME_USER_UID $RUNTIME_USER
WORKDIR /app
COPY --from=builder /workspace/hugo-mx-gateway .
COPY entrypoint.sh LICENSE /app/
COPY entrypoint.sh bin/hugo-mx-gateway LICENSE /app/
COPY templates /app/templates
RUN chown -R $RUNTIME_USER:$RUNTIME_USER /app
WORKDIR /app
ENTRYPOINT ["sh", "./entrypoint.sh"]

View File

@ -46,7 +46,7 @@ var routes = Routes{
Route{
"Healthz",
"GET",
"/healthz",
"/",
http.HandlerFunc(Healthz),
},
}