-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new implements to dockerfile and increase ttl on valkey;
- Loading branch information
1 parent
d4b6b96
commit b1bfb12
Showing
3 changed files
with
9 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
FROM golang:1.23-alpine AS builder | ||
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder | ||
|
||
WORKDIR /onboarding-app | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /app components/onboarding/cmd/app/main.go | ||
ARG TARGETPLATFORM | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$(echo $TARGETPLATFORM | cut -d'/' -f2) go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /app components/onboarding/cmd/app/main.go | ||
|
||
FROM gcr.io/distroless/static-debian12 | ||
FROM --platform=$TARGETPLATFORM gcr.io/distroless/static-debian12 | ||
|
||
COPY --from=builder /app /app | ||
|
||
# Copy the migrations directory. | ||
COPY --from=builder /onboarding-app/components/onboarding/migrations /components/onboarding/migrations | ||
|
||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
FROM golang:1.23-alpine AS builder | ||
FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder | ||
|
||
WORKDIR /transaction-app | ||
|
||
COPY go.mod go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /app components/transaction/cmd/app/main.go | ||
ARG TARGETPLATFORM | ||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$(echo $TARGETPLATFORM | cut -d'/' -f2) go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /app components/transaction/cmd/app/main.go | ||
|
||
FROM gcr.io/distroless/static-debian12 | ||
FROM --platform=$TARGETPLATFORM gcr.io/distroless/static-debian12 | ||
|
||
COPY --from=builder /app /app | ||
|
||
# Copy the migrations directory. | ||
COPY --from=builder /transaction-app/components/transaction/migrations /components/transaction/migrations | ||
|
||
EXPOSE 3001 | ||
|
||
ENTRYPOINT ["/app"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters