Оставить одну обратимую миграцию и минимальные файлы стенда

This commit is contained in:
Dima
2026-09-23 21:57:44 +03:00
parent 08cb1cbfd4
commit c6db0aa71a
13 changed files with 134 additions and 107 deletions
+1 -11
View File
@@ -7,7 +7,6 @@ COPY go.mod go.sum ./
RUN go mod download
COPY src ./src
COPY cmd ./cmd
RUN CGO_ENABLED=0 \
GOOS=linux \
@@ -17,14 +16,6 @@ RUN CGO_ENABLED=0 \
-o /out/messenger \
./src
# healthcheck script build
RUN CGO_ENABLED=0 \
GOOS=linux \
go build \
-trimpath \
-ldflags="-s -w" \
-o /out/healthcheck \
./cmd/healthcheck
FROM debian:12.15-slim
@@ -34,7 +25,6 @@ RUN groupadd --system app \
WORKDIR /app
COPY --from=builder /out/messenger ./messenger
COPY --from=builder /out/healthcheck ./healthcheck
ENV APP_HOST=0.0.0.0
ENV APP_PORT=8080
@@ -42,7 +32,7 @@ ENV APP_PORT=8080
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
CMD ["./healthcheck"]
CMD ["./messenger", "healthcheck"]
USER app:app