Skip to content

Commit

Permalink
Remove separate modules to test lazy module loading
Browse files Browse the repository at this point in the history
  • Loading branch information
infogulch committed Apr 7, 2024
1 parent 78675bd commit 4390ab4
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 626 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,16 @@ RUN adduser \
--uid "${UID}" \
"${USER}"

WORKDIR /build/cmd
WORKDIR /build
COPY go.mod go.sum /build/
COPY app/go.mod app/go.sum /build/app/
COPY cmd/go.mod cmd/go.sum /build/cmd/
COPY providers/nats/go.mod providers/nats/go.sum /build/providers/nats/
RUN go mod download

COPY . /build/
RUN CGO_ENABLED=1 \
GOFLAGS='-tags="sqlite_json"' \
GOOS=linux \
GOARCH=amd64 \
go build -ldflags="${LDFLAGS}" -o /dist/xtemplate .
go build -ldflags="${LDFLAGS}" -o /dist/xtemplate ./cmd
RUN ldd /dist/xtemplate | tr -s [:blank:] '\n' | grep ^/ | xargs -I % install -D % /dist/%
RUN ln -s ld-musl-x86_64.so.1 /dist/lib/libc.musl-x86_64.so.1

Expand Down
45 changes: 0 additions & 45 deletions app/go.mod

This file was deleted.

142 changes: 0 additions & 142 deletions app/go.sum

This file was deleted.

61 changes: 0 additions & 61 deletions cmd/go.mod

This file was deleted.

Loading

0 comments on commit 4390ab4

Please sign in to comment.