forked from mtusi2026/mtusi2026lab5
feat:level4
This commit is contained in:
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user