feat: set more help and port set

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
pull/926/head
Xinwei Xiong(cubxxw-openim) 2 years ago
parent 59c6635fb7
commit 906fb726a7
No known key found for this signature in database
GPG Key ID: 1BAD6F395338EFDE

@ -4,7 +4,7 @@
.dockerignore .dockerignore
# Ignore build artifacts # Ignore build artifacts
# _output/ _output/
logs/ logs/
# Ignore non-essential documentation # Ignore non-essential documentation

@ -255,8 +255,8 @@ builds:
- "6" - "6"
- "7" - "7"
- binary: openim-rpc-user - binary: infra
id: openim-rpc-user id: infra
main: ./tools/infra/infra.go main: ./tools/infra/infra.go
goos: goos:
- darwin - darwin
@ -273,24 +273,6 @@ builds:
- "6" - "6"
- "7" - "7"
- binary: openim-rpc-user
id: openim-rpc-user
main: ./tools/ncpu/ncpu.go
goos:
- darwin
- windows
- linux
goarch:
- s390x
- mips64
- mips64le
- amd64
- ppc64le
- arm64
goarm:
- "6"
- "7"
- binary: ncpu - binary: ncpu
id: ncpu id: ncpu
main: ./tools/ncpu/ncpu.go main: ./tools/ncpu/ncpu.go

@ -42,14 +42,9 @@ WORKDIR /openim/openim-server
COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-server/_output/bin/platforms
COPY --from=builder /openim/openim-server/config /openim/openim-server/config COPY --from=builder /openim/openim-server/config /openim/openim-server/config
EXPOSE 10170 ENV PORT 10170 \
ENV PROMETHEUS_PORT 20170 PROMETHEUS_PORT 20170 \
CONFIG=/openim/openim-server/config
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-push --port 10170
ENV PORT 10170
ENV CONFIG=/openim/openim-server/config
EXPOSE $PORT EXPOSE $PORT

@ -33,17 +33,7 @@ COPY . .
RUN make clean RUN make clean
# RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-auth
RUN make build BINS=openim-rpc
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth ./cmd/openim-rpc/openim-rpc-auth
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

@ -33,15 +33,7 @@ COPY . .
RUN make clean RUN make clean
RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-conversation
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation ./cmd/openim-rpc/openim-rpc-conversation
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

@ -33,15 +33,7 @@ COPY . .
RUN make clean RUN make clean
RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-friend
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend ./cmd/openim-rpc/openim-rpc-friend
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

@ -33,15 +33,7 @@ COPY . .
RUN make clean RUN make clean
RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-group
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group ./cmd/openim-rpc/openim-rpc-group
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

@ -33,15 +33,7 @@ COPY . .
RUN make clean RUN make clean
RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-msg
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg ./cmd/openim-rpc/openim-rpc-msg
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

@ -33,15 +33,8 @@ COPY . .
RUN make clean RUN make clean
RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-third
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third ./cmd/openim-rpc/openim-rpc-third
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

@ -33,15 +33,7 @@ COPY . .
RUN make clean RUN make clean
RUN make build BINS=openim-rpc RUN make build BINS=openim-rpc-user
# RUN CGO_ENABLED=0 go build -ldflags="-w -s" -o ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-user ./cmd/openim-rpc/openim-rpc-user
RUN rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-friend && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-group && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-msg && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-third && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-conversation && \
rm -rf ./_output/bin/platforms/$(go env GOOS)/$(go env GOARCH)/openim-rpc-auth
FROM ghcr.io/openim-sigs/openim-bash-image:latest FROM ghcr.io/openim-sigs/openim-bash-image:latest

Loading…
Cancel
Save