feat:level4

This commit is contained in:
Оля Мороз
2026-11-16 14:41:07 +03:00
parent 0a361367c7
commit 90f407b174
16 changed files with 1270 additions and 77 deletions
+5 -1
View File
@@ -9,7 +9,9 @@ RUN go mod download
COPY cmd ./cmd
COPY src ./src
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/messenger
RUN CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/messenger ./cmd/messenger && \
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/outbox ./cmd/outbox && \
CGO_ENABLED=0 GOOS=linux go build -trimpath -ldflags="-s -w" -o /out/worker ./cmd/worker
# --- runtime stage ---
FROM alpine:3.20
@@ -18,6 +20,8 @@ RUN apk add --no-cache ca-certificates postgresql-client && \
WORKDIR /app
COPY --from=build /out/messenger /app/messenger
COPY --from=build /out/worker /app/worker
COPY --from=build /out/outbox /app/outbox
COPY migrations /app/migrations
COPY scripts/migrate.sh /app/migrate.sh
RUN chmod +x /app/migrate.sh