make server & router reusable outside asynqmon package

This commit is contained in:
ajatprabha
2021-09-18 17:55:59 +05:30
committed by Ken Hibino
parent 29dd0c8213
commit 3839f96b44
33 changed files with 567 additions and 275 deletions

View File

@@ -36,13 +36,13 @@ RUN go mod download
COPY . .
# Copy frontend static files from /static to the root folder of the backend container.
COPY --from=frontend ["/static/build", "ui/build"]
COPY --from=frontend ["/static/build", "ui-assets"]
# Set necessary environmet variables needed for the image and build the server.
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
# Run go build (with ldflags to reduce binary size).
RUN go build -ldflags="-s -w" -o asynqmon .
RUN go build -ldflags="-s -w" -o asynqmon ./cmd/asynqmon
#
# Third stage:
@@ -55,4 +55,4 @@ FROM scratch
COPY --from=backend ["/build/asynqmon", "/"]
# Command to run when starting the container.
ENTRYPOINT ["/asynqmon"]
ENTRYPOINT ["/asynqmon"]