chore(app) migrated lab3 files

This commit is contained in:
imadev
2026-10-31 20:10:31 +03:00
parent ec540a1a72
commit 68968c4a3a
51 changed files with 3101 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
FROM golang:1.27.1-alpine AS build
WORKDIR /src
COPY app/go.mod app/go.sum ./
RUN go mod download
COPY app/ ./
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/server ./cmd/server
FROM alpine:3.22
RUN addgroup -S -g 10001 app && adduser -S -u 10001 -G app app
COPY --from=build /out/server /usr/local/bin/server
USER app
EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/server"]