debug variant

This commit is contained in:
kandrusyak
2023-08-08 21:59:48 +03:00
parent a015c1ac3b
commit 6a850e76de
2 changed files with 9 additions and 7 deletions

View File

@@ -1,9 +1,7 @@
FROM kandrusyak/go-build as build
LABEL authors="andrusyakka@dopcore.com"
WORKDIR /app
ENV CGO_ENABLED 1
WORKDIR /
COPY go.mod ./
@@ -11,14 +9,18 @@ RUN go mod download
COPY . ./
RUN go build -o ./app
RUN CGO_ENABLED=0 go get -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o ./app
FROM alpine:edge
WORKDIR /
COPY --from=build /app /app
COPY . .
COPY --from=build /go/bin/dlv dlv
COPY --from=build /app app
EXPOSE 8080
CMD ["/app/app"]
ENTRYPOINT [ "/dlv" , "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "/app"]

View File

@@ -1,2 +1,2 @@
SERVICE_REPLICAS=3
SERVICE_REPLICAS=1
SERVICE_PORT=8080