first commit

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
shop
2026-05-16 20:52:15 +03:00
parent 3419d90e61
commit 323e0a2926
67 changed files with 1723 additions and 3077 deletions
-27
View File
@@ -1,27 +0,0 @@
FROM golang:1.22-alpine AS builder
WORKDIR /src
RUN apk add --no-cache git ca-certificates
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" \
-o /app/server ./cmd/server
FROM alpine:3.20
RUN apk add --no-cache ca-certificates tzdata wget \
&& adduser -D -u 10001 app
WORKDIR /app
COPY --from=builder /app/server .
USER app
EXPOSE 8080
HEALTHCHECK --interval=15s --timeout=5s --start-period=20s --retries=3 \
CMD wget -qO- http://127.0.0.1:8080/health || exit 1
CMD ["./server"]