new version

This commit is contained in:
2024-10-30 22:20:03 +03:00
parent 53a1aa2cc5
commit 76fca683f7
8 changed files with 127 additions and 126 deletions
+7 -7
View File
@@ -1,16 +1,16 @@
FROM golang:1.22-alpine as build
FROM docker.io/golang:1.22-alpine as build
WORKDIR /app
COPY . .
ENV GOCACHE=/root/.cache/go-build
RUN --mount=type=cache,target="/root/.cache/go-build" go build .
RUN --mount=type=cache,target="/root/.cache/go-build" go build -C cert .
RUN --mount=type=cache,target="/root/.cache/go-build" go build -ldflags="-w -s" -gcflags=all=-l .
FROM nginx:alpine-slim
FROM scratch
COPY --from=build app app
# copy ssl for work HTTPS requests to gitea instance
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /app
COPY nginx.conf /etc/nginx/nginx.conf
ENTRYPOINT [ "sh", "entrypoint.sh" ]
ENV GIN_MODE=release
ENTRYPOINT [ "./giteapages" ]