mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 09:36:00 +08:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f82b1be0bc | |||
| c7316a35c1 | |||
| 4401a5a650 | |||
| ed23dc8a4b | |||
| 5d4fd6110d | |||
| bac711e29f | |||
| 2849b85f89 | |||
| c9da2b0744 | |||
| d70a98ee9a | |||
| 0675110e40 | |||
| f7ba123a6c | |||
| d411117b87 |
@@ -1,3 +1,17 @@
|
|||||||
|
# Copyright © 2023 OpenIM. All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
OpenIMSDK/openim-docker:
|
OpenIMSDK/openim-docker:
|
||||||
- source: ./config
|
- source: ./config
|
||||||
dest: ./openim-server/release/config
|
dest: ./openim-server/release/config
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ ENV GOPROXY=$GOPROXY
|
|||||||
# Set up the working directory
|
# Set up the working directory
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
COPY go.mod go.sum go.work ./
|
COPY go.mod go.sum ./
|
||||||
#RUN go mod download
|
RUN go mod download
|
||||||
|
|
||||||
# Copy all files to the container
|
# Copy all files to the container
|
||||||
ADD . .
|
ADD . .
|
||||||
|
|||||||
@@ -58,6 +58,16 @@ export USAGE_OPTIONS
|
|||||||
init:
|
init:
|
||||||
@$(MAKE) gen.init
|
@$(MAKE) gen.init
|
||||||
|
|
||||||
|
## init-githooks: Initialize git hooks ✨
|
||||||
|
.PHONY: init-githooks
|
||||||
|
init-githooks:
|
||||||
|
@$(MAKE) gen.init-githooks
|
||||||
|
|
||||||
|
## gen: Generate all necessary files. ✨
|
||||||
|
.PHONY: gen
|
||||||
|
gen:
|
||||||
|
@$(MAKE) gen.run
|
||||||
|
|
||||||
## demo: Run demo get started with Makefiles quickly ✨
|
## demo: Run demo get started with Makefiles quickly ✨
|
||||||
.PHONY: demo
|
.PHONY: demo
|
||||||
demo:
|
demo:
|
||||||
@@ -190,11 +200,6 @@ push.multiarch:
|
|||||||
tools:
|
tools:
|
||||||
@$(MAKE) tools.install
|
@$(MAKE) tools.install
|
||||||
|
|
||||||
## gen: Generate all necessary files. ✨
|
|
||||||
.PHONY: gen
|
|
||||||
gen:
|
|
||||||
@$(MAKE) gen.run
|
|
||||||
|
|
||||||
## swagger: Generate swagger document. ✨
|
## swagger: Generate swagger document. ✨
|
||||||
.PHONY: swagger
|
.PHONY: swagger
|
||||||
swagger:
|
swagger:
|
||||||
|
|||||||
+116
-2
@@ -255,6 +255,114 @@ builds:
|
|||||||
- "6"
|
- "6"
|
||||||
- "7"
|
- "7"
|
||||||
|
|
||||||
|
- binary: infra
|
||||||
|
id: infra
|
||||||
|
main: ./tools/infra/infra.go
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
|
- binary: ncpu
|
||||||
|
id: ncpu
|
||||||
|
main: ./tools/ncpu/ncpu.go
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
|
- binary: component
|
||||||
|
id: component
|
||||||
|
main: ./tools/component/component.go
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
|
- binary: versionchecker
|
||||||
|
id: versionchecker
|
||||||
|
main: ./tools/versionchecker/versionchecker.go
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
|
- binary: changelog
|
||||||
|
id: changelog
|
||||||
|
main: ./tools/changelog/changelog.go
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
|
- binary: yamlfmt
|
||||||
|
id: yamlfmt
|
||||||
|
main: ./tools/yamlfmt/yamlfmt.go
|
||||||
|
goos:
|
||||||
|
- darwin
|
||||||
|
- windows
|
||||||
|
- linux
|
||||||
|
goarch:
|
||||||
|
- s390x
|
||||||
|
- mips64
|
||||||
|
- mips64le
|
||||||
|
- amd64
|
||||||
|
- ppc64le
|
||||||
|
- arm64
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
|
||||||
archives:
|
archives:
|
||||||
- format: tar.gz
|
- format: tar.gz
|
||||||
# this name template makes the OS and Arch compatible with the results of uname.
|
# this name template makes the OS and Arch compatible with the results of uname.
|
||||||
@@ -269,7 +377,11 @@ archives:
|
|||||||
files:
|
files:
|
||||||
- LICENSE
|
- LICENSE
|
||||||
- README.md
|
- README.md
|
||||||
|
- README-zh_CN.md
|
||||||
|
- CODE_OF_CONDUCT.md
|
||||||
- CHANGELOG/*
|
- CHANGELOG/*
|
||||||
|
- scripts/*
|
||||||
|
- Makefile
|
||||||
- CONTRIBUTING.md
|
- CONTRIBUTING.md
|
||||||
- docs/*
|
- docs/*
|
||||||
- src: "*.md"
|
- src: "*.md"
|
||||||
@@ -339,7 +451,9 @@ changelog:
|
|||||||
# - image_templates:
|
# - image_templates:
|
||||||
# - "openimsdk/open-im-server:{{ .Tag }}-amd64"
|
# - "openimsdk/open-im-server:{{ .Tag }}-amd64"
|
||||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
|
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-amd64"
|
||||||
# dockerfile: Dockerfile
|
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||||
|
# ids:
|
||||||
|
# - openim-api
|
||||||
# use: buildx
|
# use: buildx
|
||||||
# build_flag_templates:
|
# build_flag_templates:
|
||||||
# - "--pull"
|
# - "--pull"
|
||||||
@@ -359,7 +473,7 @@ changelog:
|
|||||||
# - image_templates:
|
# - image_templates:
|
||||||
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
|
# - "goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||||
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
|
# - "ghcr.io/goreleaser/goreleaser:{{ .Tag }}-arm64"
|
||||||
# dockerfile: Dockerfile
|
# dockerfile: build/images/openim-api/Dockerfile.release
|
||||||
# use: buildx
|
# use: buildx
|
||||||
# build_flag_templates:
|
# build_flag_templates:
|
||||||
# - "--pull"
|
# - "--pull"
|
||||||
|
|||||||
@@ -43,7 +43,10 @@ COPY --from=builder /openim/openim-server/_output/bin/platforms /openim/openim-s
|
|||||||
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
COPY --from=builder /openim/openim-server/config /openim/openim-server/config
|
||||||
|
|
||||||
ENV PORT 10002
|
ENV PORT 10002
|
||||||
|
ENV CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
EXPOSE ${PORT}
|
EXPOSE $PORT
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-api --port ${PORT} -c ${SERVER_WORKDIR}/config"]
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-api /usr/bin/openim-api
|
||||||
|
|
||||||
|
CMD ["bash", "-c", "openim-api -c $CONFIG --port $PORT"]
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||||
|
|
||||||
|
COPY openim-api /usr/bin/
|
||||||
|
|
||||||
|
# nosemgrep: dockerfile.security.missing-user.missing-user
|
||||||
|
ENTRYPOINT ["/usr/bin/openim-api"]
|
||||||
|
# nosemgrep: dockerfile.security.missing-user.missing-user
|
||||||
|
CMD ["--help"]
|
||||||
@@ -42,4 +42,8 @@ WORKDIR /openim/openim-server
|
|||||||
COPY --from=builder $OPENIM_SERVER_BINDIR/platforms /openim/openim-server/_output/bin/platforms
|
COPY --from=builder $OPENIM_SERVER_BINDIR/platforms /openim/openim-server/_output/bin/platforms
|
||||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-cmdutils"]
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-cmdutils /usr/bin/openim-cmdutils
|
||||||
|
|
||||||
|
ENTRYPOINT ["openim-cmdutils"]
|
||||||
|
|
||||||
|
CMD ["--help"]
|
||||||
|
|||||||
@@ -41,4 +41,8 @@ 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
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-crontask"]
|
ENV CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-crontask /usr/bin/openim-crontask
|
||||||
|
|
||||||
|
CMD ["bash", "-c", "openim-crontask -c $CONFIG"]
|
||||||
|
|||||||
@@ -41,10 +41,13 @@ 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
|
||||||
|
|
||||||
ENV OS ${OS}
|
ENV PORT 10140
|
||||||
ENV ARCH ${ARCH}
|
ENV WS_PORT 10001
|
||||||
|
ENV CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
EXPOSE 10140
|
EXPOSE $PORT
|
||||||
EXPOSE 10001
|
EXPOSE $WS_PORT
|
||||||
|
|
||||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msggateway --port 10140 --ws_port 10001
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msggateway /usr/bin/openim-msggateway
|
||||||
|
|
||||||
|
CMD ["bash", "-c", "openim-msggateway -c $CONFIG --port $PORT --ws_port $WS_PORT"]
|
||||||
@@ -36,12 +36,11 @@ RUN make build BINS=openim-msgtransfer
|
|||||||
|
|
||||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
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
|
||||||
|
|
||||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msgtransfer
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-msgtransfer /usr/bin/openim-msgtransfer
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then openim-msgtransfer -c $CONFIG --prometheus_port $PROMETHEUS_PORT; else openim-msgtransfer -c $CONFIG; fi"]
|
||||||
@@ -15,6 +15,7 @@
|
|||||||
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
# OpenIM base image: https://github.com/openim-sigs/openim-base-image
|
||||||
|
|
||||||
# Set go mod installation source and proxy
|
# Set go mod installation source and proxy
|
||||||
|
# docker run -e "PORT=10003" -e "PROMETHEUSORT=4321" --network host -it 67ef891ad1ff
|
||||||
|
|
||||||
FROM golang:1.20 AS builder
|
FROM golang:1.20 AS builder
|
||||||
|
|
||||||
@@ -38,12 +39,15 @@ FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
|||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 \
|
||||||
|
PROMETHEUS_PORT 20170 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-push --port 10170
|
EXPOSE $PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-push /usr/bin/openim-push
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then openim-push -c $CONFIG --port $PORT --prometheus_port $PROMETHEUS_PORT; else openim-push -c $CONFIG --port $PORT; fi"]
|
||||||
@@ -33,21 +33,20 @@ COPY . .
|
|||||||
|
|
||||||
RUN make clean
|
RUN make clean
|
||||||
|
|
||||||
# RUN make build BINS=openim-rpc
|
RUN make build BINS=openim-rpc-auth
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
FROM ghcr.io/openim-sigs/openim-bash-image:latest
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10160
|
ENV PORT 10160
|
||||||
|
ENV CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
# ENTRYPOINT
|
EXPOSE $PORT
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-auth --port 10160 -c ${SERVER_WORKDIR}/config"]
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-auth /usr/bin/openim-rpc-auth
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-auth --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-auth --port $PORT -c $CONFIG"; fi"]
|
||||||
@@ -33,27 +33,22 @@ 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
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10230
|
ENV PORT 10230 \
|
||||||
EXPOSE 20230
|
PROMETHEUS_PORT 20230 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-conversation --port 10230 --prometheus_port 20230 -c ${SERVER_WORKDIR}/config"]
|
EXPOSE $PORT
|
||||||
|
EXPOSE $PROMETHEUS_PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-conversation /usr/bin/openim-rpc-conversation
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-conversation --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-conversation --port $PORT -c $CONFIG"; fi"]
|
||||||
@@ -33,27 +33,22 @@ 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
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10120
|
ENV PORT 10120 \
|
||||||
EXPOSE 20120
|
PROMETHEUS_PORT 20120 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-friend --port 10120 --prometheus_port 20120 -c ${SERVER_WORKDIR}/config"]
|
EXPOSE $PORT
|
||||||
|
EXPOSE $PROMETHEUS_PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-friend /usr/bin/openim-rpc-friend
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-friend --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-friend --port $PORT -c $CONFIG"; fi"]
|
||||||
|
|||||||
@@ -33,27 +33,22 @@ 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
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10150
|
ENV PORT 10150 \
|
||||||
EXPOSE 20150
|
PROMETHEUS_PORT 20150 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-group --port 10150 --prometheus_port 20150 -c ${SERVER_WORKDIR}/config"]
|
EXPOSE $PORT
|
||||||
|
EXPOSE $PROMETHEUS_PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-group /usr/bin/openim-rpc-group
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-group --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-group --port $PORT -c $CONFIG"; fi"]
|
||||||
@@ -33,27 +33,22 @@ 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
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10130
|
ENV PORT 10130 \
|
||||||
EXPOSE 20130
|
PROMETHEUS_PORT 20130 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-msg --port 10130 --prometheus_port 20130 -c ${SERVER_WORKDIR}/config"]
|
EXPOSE $PORT
|
||||||
|
EXPOSE $PROMETHEUS_PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-msg /usr/bin/openim-rpc-msg
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-msg --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-msg --port $PORT -c $CONFIG"; fi"]
|
||||||
@@ -33,26 +33,21 @@ 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
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10200
|
ENV PORT 10200 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-third --port 10200 -c ${SERVER_WORKDIR}/config"]
|
EXPOSE $PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-third /usr/bin/openim-rpc-third
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-third --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-third --port $PORT -c $CONFIG"; fi"]
|
||||||
|
|||||||
@@ -33,26 +33,20 @@ 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
|
||||||
|
|
||||||
WORKDIR /openim/openim-server
|
WORKDIR /openim/openim-server
|
||||||
|
|
||||||
ENV OS ${OS}
|
|
||||||
ENV ARCH ${ARCH}
|
|
||||||
|
|
||||||
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 10110
|
ENV PORT 10110 \
|
||||||
|
CONFIG=/openim/openim-server/config
|
||||||
|
|
||||||
CMD ["bash", "-c","${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-user --port 10110 -c ${SERVER_WORKDIR}/config"]
|
EXPOSE $PORT
|
||||||
|
|
||||||
|
RUN cp -r ${OPENIM_SERVER_BINDIR}/platforms/$(get_os)/$(get_arch)/openim-rpc-user /usr/bin/openim-rpc-user
|
||||||
|
|
||||||
|
ENTRYPOINT ["bash", "-c", "if [[ -n $PROMETHEUS_PORT ]]; then "openim-rpc-user --port $PORT -c $CONFIG" --prometheus_port $PROMETHEUS_PORT; else "openim-rpc-user --port $PORT -c $CONFIG"; fi"]
|
||||||
|
|||||||
@@ -103,11 +103,11 @@ services:
|
|||||||
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
# image: registry.cn-hangzhou.aliyuncs.com/openimsdk/openim-server:main
|
||||||
# image: openim/openim-server:main
|
# image: openim/openim-server:main
|
||||||
container_name: openim-server
|
container_name: openim-server
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: ["CMD-SHELL", "./scripts/check-all.sh"]
|
test: ["CMD", "./scripts/check-all.sh"]
|
||||||
# interval: 30s
|
interval: 30s
|
||||||
# timeout: 10s
|
timeout: 10s
|
||||||
# retries: 5
|
retries: 5
|
||||||
volumes:
|
volumes:
|
||||||
- ./logs:/openim/openim-server/logs
|
- ./logs:/openim/openim-server/logs
|
||||||
- ./config:/openim/openim-server/config
|
- ./config:/openim/openim-server/config
|
||||||
@@ -1,3 +1,17 @@
|
|||||||
|
// Copyright © 2023 OpenIM. All rights reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
package kafka
|
package kafka
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
|
// Copyright © 2023 OpenIM. All rights reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
package tls
|
package tls
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
# package, the build will produce executable files under $(OUT_DIR)/bin/platforms OR $(OUT_DIR)/bin—tools/platforms.
|
# package, the build will produce executable files under $(OUT_DIR)/bin/platforms OR $(OUT_DIR)/bin—tools/platforms.
|
||||||
# If not specified, "everything" will be built.
|
# If not specified, "everything" will be built.
|
||||||
# Usage: `scripts/build-all-service.sh`.
|
# Usage: `scripts/build-all-service.sh`.
|
||||||
# Example: `hack/build-go.sh WHAT=cmd/kubelet`.
|
# Example: `scripts/build-go.sh WHAT=cmd/kubelet`.
|
||||||
|
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ source "${OPENIM_ROOT}/scripts/install/common.sh"
|
|||||||
|
|
||||||
OPENIM_VERBOSE=4
|
OPENIM_VERBOSE=4
|
||||||
|
|
||||||
|
openim::log::info "\n# Begin to check all openim service"
|
||||||
|
|
||||||
# OpenIM status
|
# OpenIM status
|
||||||
# Elegant printing function
|
# Elegant printing function
|
||||||
print_services_and_ports() {
|
print_services_and_ports() {
|
||||||
@@ -55,7 +57,7 @@ print_services_and_ports OPENIM_DEPENDENCY_TARGETS OPENIM_DEPENDENCY_PORT_TARGET
|
|||||||
|
|
||||||
# OpenIM check
|
# OpenIM check
|
||||||
echo "++ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
echo "++ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
||||||
echo "## Check all dependent service ports"
|
openim::log::info "\n## Check all dependent service ports"
|
||||||
echo "+++ The port being checked: ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}"
|
echo "+++ The port being checked: ${OPENIM_DEPENDENCY_PORT_LISTARIES[@]}"
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
@@ -69,10 +71,10 @@ else
|
|||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo -e "\n## Check OpenIM service name"
|
openim::log::info "\n## Check OpenIM service name"
|
||||||
. $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check
|
. $(dirname ${BASH_SOURCE})/install/openim-msgtransfer.sh openim::msgtransfer::check
|
||||||
|
|
||||||
echo -e "\n## Check all OpenIM service ports"
|
openim::log::info "\n## Check all OpenIM service ports"
|
||||||
echo "+++ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
echo "+++ The port being checked: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
||||||
openim::util::check_ports ${OPENIM_SERVER_PORT_LISTARIES[@]}
|
openim::util::check_ports ${OPENIM_SERVER_PORT_LISTARIES[@]}
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
|
|||||||
@@ -14,18 +14,24 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
#fixme This scripts is the total startup scripts
|
#fixme This scripts is the total startup scripts
|
||||||
#fixme The full name of the shell scripts that needs to be started is placed in the need_to_start_server_shell array
|
#fixme The full name of the shell scripts that needs to be started is placed in the need_to_start_server_shell array
|
||||||
|
|
||||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||||
|
|
||||||
|
openim::log::info "\n# Use Docker to start all openim service"
|
||||||
|
|
||||||
trap 'openim::util::onCtrlC' INT
|
trap 'openim::util::onCtrlC' INT
|
||||||
|
|
||||||
nohup "${OPENIM_ROOT}"/scripts/start-all.sh >> ${LOG_FILE} 2>&1 &
|
"${OPENIM_ROOT}"/scripts/start-all.sh
|
||||||
|
|
||||||
sleep 15
|
sleep 5
|
||||||
|
|
||||||
nohup "${OPENIM_ROOT}"/scripts/check-all.sh >> ${LOG_FILE} 2>&1 &
|
"${OPENIM_ROOT}"/scripts/check-all.sh
|
||||||
|
|
||||||
tail -f ${LOG_FILE}
|
tail -f ${LOG_FILE}
|
||||||
+15
-12
@@ -24,27 +24,30 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|||||||
|
|
||||||
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
source "${OPENIM_ROOT}/scripts/lib/init.sh"
|
||||||
|
|
||||||
# 定义一个配置文件数组,其中包含需要生成的配置文件的名称路径 (en: Define a profile array that contains the name path of the profile to be generated.)
|
# 定义一个配置文件数组,其中包含需要生成的配置文件的名称路径
|
||||||
readonly ENV_FILE=${ENV_FILE:-"${OPENIM_ROOT}"/scripts/install/environment.sh}
|
# (en: Define a profile array that contains the name path of the profile to be generated.)
|
||||||
|
readonly ENV_FILE=${ENV_FILE:-"${OPENIM_ROOT}/scripts/install/environment.sh"}
|
||||||
|
|
||||||
# 定义关联数组,其中键是模板文件,值是对应的输出文件 (en: Defines an associative array where the keys are the template files and the values are the corresponding output files.)
|
# 定义关联数组,其中键是模板文件,值是对应的输出文件
|
||||||
|
# (en: Defines an associative array where the keys are the template files and the values are the corresponding output files.)
|
||||||
declare -A TEMPLATES=(
|
declare -A TEMPLATES=(
|
||||||
[""${OPENIM_ROOT}"/deployments/templates/env_template.yaml"]=""${OPENIM_ROOT}"/.env"
|
["${OPENIM_ROOT}/deployments/templates/env_template.yaml"]="${OPENIM_ROOT}/.env"
|
||||||
[""${OPENIM_ROOT}"/deployments/templates/openim.yaml"]=""${OPENIM_ROOT}"/config/config.yaml"
|
["${OPENIM_ROOT}/deployments/templates/openim.yaml"]="${OPENIM_ROOT}/config/config.yaml"
|
||||||
)
|
)
|
||||||
|
|
||||||
for template in "${!TEMPLATES[@]}"; do
|
for template in "${!TEMPLATES[@]}"; do
|
||||||
output_file=${TEMPLATES[$template]}
|
|
||||||
|
|
||||||
if [[ ! -f "${template}" ]]; then
|
if [[ ! -f "${template}" ]]; then
|
||||||
openim::log::error_exit "template file ${template} does not exist..."
|
openim::log::error_exit "template file ${template} does not exist..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
openim::log::info "⌚ Working with template file: ${template} to ${output_file}..."
|
IFS=';' read -ra OUTPUT_FILES <<< "${TEMPLATES[$template]}"
|
||||||
""${OPENIM_ROOT}"/scripts/genconfig.sh" "${ENV_FILE}" "${template}" > "${output_file}" || {
|
for output_file in "${OUTPUT_FILES[@]}"; do
|
||||||
openim::log::error "Error processing template file ${template}"
|
openim::log::info "⌚ Working with template file: ${template} to ${output_file}..."
|
||||||
exit 1
|
"${OPENIM_ROOT}/scripts/genconfig.sh" "${ENV_FILE}" "${template}" > "${output_file}" || {
|
||||||
}
|
openim::log::error "Error processing template file ${template}"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
openim::log::success "✨ All configuration files have been successfully generated!"
|
openim::log::success "✨ All configuration files have been successfully generated!"
|
||||||
@@ -22,6 +22,8 @@ set -o pipefail
|
|||||||
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd -P)
|
OPENIM_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd -P)
|
||||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||||
|
|
||||||
|
openim::log::info "\n# Begin Install OpenIM Config"
|
||||||
|
|
||||||
for file in "${OPENIM_SERVER_TARGETS[@]}"; do
|
for file in "${OPENIM_SERVER_TARGETS[@]}"; do
|
||||||
VARNAME="$(echo $file | tr '[:lower:]' '[:upper:]' | tr '.' '_' | tr '-' '_')"
|
VARNAME="$(echo $file | tr '[:lower:]' '[:upper:]' | tr '.' '_' | tr '-' '_')"
|
||||||
VARVALUE="$OPENIM_OUTPUT_HOSTBIN/$file"
|
VARVALUE="$OPENIM_OUTPUT_HOSTBIN/$file"
|
||||||
|
|||||||
Executable
+89
@@ -0,0 +1,89 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright © 2023 OpenIM. All rights reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
# init-githooks.sh
|
||||||
|
#
|
||||||
|
# This script assists in managing Git hooks for the OpenIM project.
|
||||||
|
# When executed:
|
||||||
|
# 1. It prompts the user to enable git hooks.
|
||||||
|
# 2. If the user accepts, it copies predefined hook scripts to the appropriate
|
||||||
|
# Git directory, making them executable.
|
||||||
|
# 3. If requested, it can delete the added hooks.
|
||||||
|
#
|
||||||
|
# This script equal runs `make init-githooks` command.
|
||||||
|
# Usage:
|
||||||
|
# ./init-githooks.sh Prompt to enable git hooks.
|
||||||
|
# ./init-githooks.sh --delete Delete previously added git hooks.
|
||||||
|
# ./init-githooks.sh --help Show the help message.
|
||||||
|
#
|
||||||
|
# Example: `scripts/build-go.sh --help`.
|
||||||
|
# Documentation & related context can be found at:
|
||||||
|
# https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694
|
||||||
|
#
|
||||||
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
|
HOOKS_DIR=".git/hooks"
|
||||||
|
|
||||||
|
help_info() {
|
||||||
|
echo "Usage: $0 [options]"
|
||||||
|
echo
|
||||||
|
echo "This script helps to manage git hooks."
|
||||||
|
echo
|
||||||
|
echo "Options:"
|
||||||
|
echo " -h, --help Show this help message and exit."
|
||||||
|
echo " -d, --delete Delete the hooks that have been added."
|
||||||
|
echo " By default, it will prompt to enable git hooks."
|
||||||
|
}
|
||||||
|
|
||||||
|
delete_hooks() {
|
||||||
|
for file in scripts/githooks/*.sh; do
|
||||||
|
hook_name=$(basename "$file" .sh)
|
||||||
|
rm -f "$HOOKS_DIR/$hook_name"
|
||||||
|
done
|
||||||
|
echo "Git hooks have been deleted."
|
||||||
|
}
|
||||||
|
|
||||||
|
enable_hooks() {
|
||||||
|
echo "Would you like to enable git hooks mode? [y/n]"
|
||||||
|
read -r choice
|
||||||
|
|
||||||
|
if [[ $choice == "y" || $choice == "Y" ]]; then
|
||||||
|
for file in scripts/githooks/*.sh; do
|
||||||
|
cp -f "$file" "$HOOKS_DIR/$(basename "$file" .sh)"
|
||||||
|
done
|
||||||
|
|
||||||
|
chmod +x $HOOKS_DIR/*
|
||||||
|
|
||||||
|
echo "Git hooks mode has been enabled."
|
||||||
|
echo "With git hooks enabled, every time you perform a git action (e.g. git commit), the corresponding hooks script will be triggered automatically."
|
||||||
|
echo "This means that if the size of the file you're committing exceeds the set limit (e.g. 42MB), the commit will be rejected."
|
||||||
|
else
|
||||||
|
echo "Git hooks mode remains disabled."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
-h|--help)
|
||||||
|
help_info
|
||||||
|
;;
|
||||||
|
-d|--delete)
|
||||||
|
delete_hooks
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
enable_hooks
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -135,10 +135,11 @@ function openim::rpc::start() {
|
|||||||
for ((j = 0; j < ${#OPENIM_RPC_SERVICE_PORTS_ARRAY[@]}; j++)); do
|
for ((j = 0; j < ${#OPENIM_RPC_SERVICE_PORTS_ARRAY[@]}; j++)); do
|
||||||
openim::log::info "Starting ${OPENIM_RPC_SERVICE_LISTARIES[$i]} service, port: ${OPENIM_RPC_SERVICE_PORTS[j]}, prometheus port: ${OPENIM_RPC_PROM_PORTS[j]}, binary root: ${OPENIM_OUTPUT_HOSTBIN}/${OPENIM_RPC_SERVICE_LISTARIES[$i]}"
|
openim::log::info "Starting ${OPENIM_RPC_SERVICE_LISTARIES[$i]} service, port: ${OPENIM_RPC_SERVICE_PORTS[j]}, prometheus port: ${OPENIM_RPC_PROM_PORTS[j]}, binary root: ${OPENIM_OUTPUT_HOSTBIN}/${OPENIM_RPC_SERVICE_LISTARIES[$i]}"
|
||||||
openim::rpc::start_service "${OPENIM_RPC_SERVICE_LISTARIES[$i]}" "${OPENIM_RPC_SERVICE_PORTS[j]}" "${OPENIM_RPC_PROM_PORTS[j]}"
|
openim::rpc::start_service "${OPENIM_RPC_SERVICE_LISTARIES[$i]}" "${OPENIM_RPC_SERVICE_PORTS[j]}" "${OPENIM_RPC_PROM_PORTS[j]}"
|
||||||
sleep 0.5
|
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
|
||||||
openim::util::check_ports ${OPENIM_RPC_PORT_TARGETS[@]}
|
openim::util::check_ports ${OPENIM_RPC_PORT_TARGETS[@]}
|
||||||
# openim::util::check_ports ${OPENIM_RPC_PROM_PORT_TARGETS[@]}
|
# openim::util::check_ports ${OPENIM_RPC_PROM_PORT_TARGETS[@]}
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ readonly OPENIM_TOOLS_PRE_START_NAME_LISTARIES=("${OPENIM_TOOLS_PRE_START_NAME_T
|
|||||||
openim::tools::post_start_name() {
|
openim::tools::post_start_name() {
|
||||||
local targets=(
|
local targets=(
|
||||||
infra
|
infra
|
||||||
|
versionchecker
|
||||||
)
|
)
|
||||||
echo "${targets[@]}"
|
echo "${targets[@]}"
|
||||||
}
|
}
|
||||||
@@ -102,7 +103,7 @@ function openim::tools::start_service() {
|
|||||||
cmd="${cmd} --prometheus_port ${prometheus_port}"
|
cmd="${cmd} --prometheus_port ${prometheus_port}"
|
||||||
fi
|
fi
|
||||||
openim::log::info "Starting ${binary_name}..."
|
openim::log::info "Starting ${binary_name}..."
|
||||||
${cmd} >> "${LOG_FILE}" 2>&1 &
|
${cmd}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openim::tools::start() {
|
function openim::tools::start() {
|
||||||
|
|||||||
@@ -212,11 +212,11 @@ openim::log::success()
|
|||||||
|
|
||||||
function openim::log::test_log() {
|
function openim::log::test_log() {
|
||||||
echo_log "test log"
|
echo_log "test log"
|
||||||
openim::log::error "openim::log::error"
|
|
||||||
openim::log::info "openim::log::info"
|
openim::log::info "openim::log::info"
|
||||||
openim::log::progress "openim::log::progress"
|
openim::log::progress "openim::log::progress"
|
||||||
openim::log::status "openim::log::status"
|
openim::log::status "openim::log::status"
|
||||||
openim::log::success "openim::log::success"
|
openim::log::success "openim::log::success"
|
||||||
|
openim::log::error "openim::log::error"
|
||||||
openim::log::error_exit "openim::log::error_exit"
|
openim::log::error_exit "openim::log::error_exit"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+20
-14
@@ -267,25 +267,29 @@ openim::util::check_ports() {
|
|||||||
openim::log::info "Checking ports: $*"
|
openim::log::info "Checking ports: $*"
|
||||||
# Iterate over each given port.
|
# Iterate over each given port.
|
||||||
for port in "$@"; do
|
for port in "$@"; do
|
||||||
# Use the `lsof` command to find process information related to the given port.
|
# Use the `ss` command to find process information related to the given port.
|
||||||
local info=$(lsof -i :$port -n -P | grep LISTEN || true)
|
local info=$(ss -ltnp | grep -w ":$port" || true)
|
||||||
|
|
||||||
# If there's no process information, it means the process associated with the port is not running.
|
# If there's no process information, it means the process associated with the port is not running.
|
||||||
if [[ -z $info ]]; then
|
if [[ -z $info ]]; then
|
||||||
not_started+=($port)
|
not_started+=($port)
|
||||||
else
|
else
|
||||||
# If there's process information, extract relevant details:
|
# Extract relevant details: Process Name, PID, and FD.
|
||||||
# Process ID, Command Name, and Start Time.
|
local details=$(echo $info | sed -n 's/.*users:(("\([^"]*\)",pid=\([^,]*\),fd=\([^)]*\))).*/\1 \2 \3/p')
|
||||||
local pid=$(echo $info | awk '{print $2}')
|
local command=$(echo $details | awk '{print $1}')
|
||||||
local command=$(echo $info | awk '{print $1}')
|
local pid=$(echo $details | awk '{print $2}')
|
||||||
local start_time=$(ps -o lstart= -p $pid)
|
local fd=$(echo $details | awk '{print $3}')
|
||||||
started+=("Port $port - Command: $command, PID: $pid, Start time: $start_time")
|
|
||||||
|
# Get the start time of the process using the PID
|
||||||
|
local start_time=$(ps -p $pid -o lstart=)
|
||||||
|
|
||||||
|
started+=("Port $port - Command: $command, PID: $pid, FD: $fd, Started: $start_time")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo
|
|
||||||
# Print information about ports whose processes are not running.
|
# Print information about ports whose processes are not running.
|
||||||
if [[ ${#not_started[@]} -ne 0 ]]; then
|
if [[ ${#not_started[@]} -ne 0 ]]; then
|
||||||
openim::log::info "### Not started ports:"
|
openim::log::info "\n### Not started ports:"
|
||||||
for port in "${not_started[@]}"; do
|
for port in "${not_started[@]}"; do
|
||||||
openim::log::error "Port $port is not started."
|
openim::log::error "Port $port is not started."
|
||||||
done
|
done
|
||||||
@@ -293,8 +297,7 @@ openim::util::check_ports() {
|
|||||||
|
|
||||||
# Print information about ports whose processes are running.
|
# Print information about ports whose processes are running.
|
||||||
if [[ ${#started[@]} -ne 0 ]]; then
|
if [[ ${#started[@]} -ne 0 ]]; then
|
||||||
echo
|
openim::log::info "\n### Started ports:"
|
||||||
openim::log::info "### Started ports:"
|
|
||||||
for info in "${started[@]}"; do
|
for info in "${started[@]}"; do
|
||||||
openim::log::info "$info"
|
openim::log::info "$info"
|
||||||
done
|
done
|
||||||
@@ -305,11 +308,14 @@ openim::util::check_ports() {
|
|||||||
echo "++++ OpenIM Log >> cat ${LOG_FILE}"
|
echo "++++ OpenIM Log >> cat ${LOG_FILE}"
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
openim::log::success "started[@] processes are running."
|
openim::log::success "All specified processes are running."
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
# openim::util::check_ports 10002 1004
|
# set +o errexit
|
||||||
|
# Sample call for testing:
|
||||||
|
# openim::util::check_ports 10002 1004 12345 13306
|
||||||
|
# set -o errexit
|
||||||
|
|
||||||
# The `openim::util::check_process_names` function analyzes the state of processes based on given names.
|
# The `openim::util::check_process_names` function analyzes the state of processes based on given names.
|
||||||
# It accepts multiple process names as arguments and prints:
|
# It accepts multiple process names as arguments and prints:
|
||||||
|
|||||||
@@ -140,10 +140,6 @@ ifndef V
|
|||||||
MAKEFLAGS += --no-print-directory
|
MAKEFLAGS += --no-print-directory
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Copy githook scripts when execute makefile
|
|
||||||
# TODO! GIT_FILE_SIZE_LIMIT=42000000 git commit -m "This commit is allowed file sizes up to 42MB"
|
|
||||||
COPY_GITHOOK:=$(shell cp -f scripts/githooks/* .git/hooks/; chmod +x .git/hooks/*)
|
|
||||||
|
|
||||||
# COMMA: Concatenate multiple strings to form a list of strings
|
# COMMA: Concatenate multiple strings to form a list of strings
|
||||||
COMMA := ,
|
COMMA := ,
|
||||||
# SPACE: Used to separate strings
|
# SPACE: Used to separate strings
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ gen.init:
|
|||||||
@echo "===========> Initializing openim server project"
|
@echo "===========> Initializing openim server project"
|
||||||
@${ROOT_DIR}/scripts/init-config.sh
|
@${ROOT_DIR}/scripts/init-config.sh
|
||||||
|
|
||||||
|
## gen.init-githooks: Initialize git hooks ✨
|
||||||
|
.PHONY: gen.init-githooks
|
||||||
|
gen.init-githooks:
|
||||||
|
@echo "===========> Initializing git hooks"
|
||||||
|
@${ROOT_DIR}/scripts/init-githooks.sh
|
||||||
|
|
||||||
## gen.run: Generate necessary files and docs ✨
|
## gen.run: Generate necessary files and docs ✨
|
||||||
.PHONY: gen.run
|
.PHONY: gen.run
|
||||||
#gen.run: gen.errcode gen.docgo
|
#gen.run: gen.errcode gen.docgo
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ set -o pipefail
|
|||||||
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
||||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||||
|
|
||||||
|
openim::log::info "\n# Begin to start all openim service scripts"
|
||||||
|
|
||||||
set +o errexit
|
set +o errexit
|
||||||
openim::golang::check_openim_binaries
|
openim::golang::check_openim_binaries
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
@@ -61,16 +63,21 @@ function execute_scripts() {
|
|||||||
else
|
else
|
||||||
openim::log::errexit "Script ${script_path##*/} is missing or not executable."
|
openim::log::errexit "Script ${script_path##*/} is missing or not executable."
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
|
||||||
done
|
done
|
||||||
|
sleep 0.5
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# TODO Prelaunch tools, simple for now, can abstract functions later
|
# TODO Prelaunch tools, simple for now, can abstract functions later
|
||||||
TOOLS_START_SCRIPTS_PATH=${START_SCRIPTS_PATH}/openim-tools.sh
|
TOOLS_START_SCRIPTS_PATH=${START_SCRIPTS_PATH}/openim-tools.sh
|
||||||
|
|
||||||
|
openim::log::info "\n## Pre Starting OpenIM services"
|
||||||
${TOOLS_START_SCRIPTS_PATH} openim::tools::pre-start
|
${TOOLS_START_SCRIPTS_PATH} openim::tools::pre-start
|
||||||
|
|
||||||
|
openim::log::info "\n## Starting OpenIM services"
|
||||||
execute_scripts
|
execute_scripts
|
||||||
|
|
||||||
|
openim::log::info "\n## Post Starting OpenIM services"
|
||||||
${TOOLS_START_SCRIPTS_PATH} openim::tools::post-start
|
${TOOLS_START_SCRIPTS_PATH} openim::tools::post-start
|
||||||
|
|
||||||
openim::log::success "✨ All OpenIM services have been successfully started!"
|
openim::log::success "✨ All OpenIM services have been successfully started!"
|
||||||
@@ -26,6 +26,8 @@ OPENIM_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
|
|||||||
|
|
||||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
||||||
|
|
||||||
|
openim::log::info "\n# Begin to stop all openim service"
|
||||||
|
|
||||||
echo "++ Ready to stop port: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
echo "++ Ready to stop port: ${OPENIM_SERVER_PORT_LISTARIES[@]}"
|
||||||
|
|
||||||
openim::util::stop_services_on_ports ${OPENIM_SERVER_PORT_LISTARIES[@]}
|
openim::util::stop_services_on_ports ${OPENIM_SERVER_PORT_LISTARIES[@]}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/test/typecheck
|
module github.com/OpenIMSDK/Open-IM-Server/test/typecheck
|
||||||
|
|
||||||
go 1.20
|
go 1.18
|
||||||
|
|
||||||
require golang.org/x/tools v0.12.0
|
require golang.org/x/tools v0.12.0
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/changelog
|
module github.com/OpenIMSDK/Open-IM-Server/tools/changelog
|
||||||
|
|
||||||
go 1.20
|
go 1.18
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/component
|
module github.com/OpenIMSDK/Open-IM-Server/tools/component
|
||||||
|
|
||||||
go 1.19
|
go 1.18
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/imctl
|
module github.com/OpenIMSDK/Open-IM-Server/tools/imctl
|
||||||
|
|
||||||
go 1.20
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/MakeNowJust/heredoc/v2 v2.0.1
|
github.com/MakeNowJust/heredoc/v2 v2.0.1
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/infra
|
module github.com/OpenIMSDK/Open-IM-Server/tools/infra
|
||||||
|
|
||||||
go 1.20
|
go 1.18
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/ncpu
|
module github.com/OpenIMSDK/Open-IM-Server/tools/ncpu
|
||||||
|
|
||||||
go 1.20
|
go 1.18
|
||||||
|
|
||||||
require go.uber.org/automaxprocs v1.5.3
|
require go.uber.org/automaxprocs v1.5.3
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/versionchecker
|
module github.com/OpenIMSDK/Open-IM-Server/tools/versionchecker
|
||||||
|
|
||||||
go 1.20.0
|
go 1.18
|
||||||
|
|||||||
@@ -1,3 +1,17 @@
|
|||||||
|
// Copyright © 2023 OpenIM. All rights reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module github.com/OpenIMSDK/Open-IM-Server/tools/yamlfmt
|
module github.com/OpenIMSDK/Open-IM-Server/tools/yamlfmt
|
||||||
|
|
||||||
go 1.20
|
go 1.18
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/likexian/gokit v0.25.13
|
github.com/likexian/gokit v0.25.13
|
||||||
|
|||||||
Reference in New Issue
Block a user