Browse Source

build with pub sub clients for testing

pull/5637/head
Chris Lu 11 months ago
parent
commit
c471265837
  1. 4
      .gitignore
  2. 2
      docker/Dockerfile.local
  3. 2
      docker/Makefile

4
.gitignore

@ -91,4 +91,6 @@ weed/mq/client/cmd/weed_pub/weed_pub
docker/weed docker/weed
# test generated files # test generated files
weed/*/*.jpg
weed/*/*.jpg
docker/weed_sub
docker/weed_pub

2
docker/Dockerfile.local

@ -1,6 +1,8 @@
FROM alpine AS final FROM alpine AS final
LABEL author="Chris Lu" LABEL author="Chris Lu"
COPY ./weed /usr/bin/ COPY ./weed /usr/bin/
COPY ./weed_pub /usr/bin/
COPY ./weed_sub /usr/bin/
RUN mkdir -p /etc/seaweedfs RUN mkdir -p /etc/seaweedfs
COPY ./filer.toml /etc/seaweedfs/filer.toml COPY ./filer.toml /etc/seaweedfs/filer.toml
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh

2
docker/Makefile

@ -9,6 +9,8 @@ binary:
export SWCOMMIT=$(shell git rev-parse --short HEAD) export SWCOMMIT=$(shell git rev-parse --short HEAD)
export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)" export SWLDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(SWCOMMIT)"
cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-s -w -extldflags -static $(SWLDFLAGS)" && mv weed ../docker/ cd ../weed && CGO_ENABLED=$(cgo) GOOS=linux go build $(options) -tags "$(tags)" -ldflags "-s -w -extldflags -static $(SWLDFLAGS)" && mv weed ../docker/
cd ../weed/mq/client/cmd/weed_pub && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_pub ../../../../../docker/
cd ../weed/mq/client/cmd/weed_sub && CGO_ENABLED=$(cgo) GOOS=linux go build && mv weed_sub ../../../../../docker/
binary_race: options = -race binary_race: options = -race
binary_race: cgo = 1 binary_race: cgo = 1

Loading…
Cancel
Save