feat: add openim helm charts

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
pull/1291/head
Xinwei Xiong(cubxxw) 2 years ago
parent d9d01ccb52
commit 1b625a20a7

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -51,10 +51,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -48,10 +48,10 @@ spec:
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
- mountPath: /oepnim/openim-server/config/config.yaml - mountPath: /config/config.yaml
name: config name: config
subPath: config.yaml subPath: config.yaml
- mountPath: /oepnim/openim-server/config/notification.yaml - mountPath: /config/notification.yaml
name: config name: config
subPath: notification.yaml subPath: notification.yaml
volumes: volumes:

@ -1,37 +0,0 @@
#!/bin/bash
IMAGEHUB="ghcr.io/openimsdk"
PROJECT=$1
ALLPRO="all"
servers=(openim-api openim-crontask openim-msggateway openim-msgtransfer openim-push openim-rpc-auth openim-rpc-conversation openim-rpc-friend openim-rpc-group openim-rpc-msg openim-rpc-third openim-rpc-user)
if [ "$1" != "" ]
then
if [[ "${servers[@]}" =~ "${1}" ]]
then
echo "building ${PROJECT}"
DOCKER_PUSHIMG=${IMAGEHUB}/${PROJECT}:dev
docker rmi ${DOCKER_PUSHIMG}
docker build -f manifest/dockerfiles/${PROJECT}/Dockerfile -t ${DOCKER_PUSHIMG} .
docker push ${DOCKER_PUSHIMG}
elif [[ ! "${servers[@]}" =~ "${1}" ]]
then
if [ ${PROJECT} == ${ALLPRO} ]
then
echo "building allproject"
for element in ${servers[@]}
do
SUB_IMG=${element}
SUB_PUSHIMG=${IMAGEHUB}/${element}:dev
docker rmi ${SUB_PUSHIMG}
docker build -f manifest/dockerfiles/${SUB_IMG}/Dockerfile -t ${SUB_PUSHIMG} .
docker push ${SUB_PUSHIMG}
done
else
echo "输入的项目名称不正确"
fi
fi
else
echo "请传入一个参数"
fi

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-api/openim-api cmd/openim-api/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-api/openim-api /app/bin/
ENTRYPOINT ["/app/bin/openim-api"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-crontask/openim-crontask cmd/openim-crontask/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-crontask/openim-crontask /app/bin/
ENTRYPOINT ["/app/bin/openim-crontask"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-msggateway/openim-msggateway cmd/openim-msggateway/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-msggateway/openim-msggateway /app/bin/
ENTRYPOINT ["/app/bin/openim-msggateway"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-msgtransfer/openim-msgtransfer cmd/openim-msgtransfer/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-msgtransfer/openim-msgtransfer /app/bin/
ENTRYPOINT ["/app/bin/openim-msgtransfer"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-push/openim-push cmd/openim-push/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-push/openim-push /app/bin/
ENTRYPOINT ["/app/bin/openim-push"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-auth/openim-rpc-auth cmd/openim-rpc/openim-rpc-auth/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-auth/openim-rpc-auth /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-auth"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-conversation/openim-rpc-conversation cmd/openim-rpc/openim-rpc-conversation/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-conversation/openim-rpc-conversation /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-conversation"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-friend/openim-rpc-friend cmd/openim-rpc/openim-rpc-friend/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-friend/openim-rpc-friend /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-friend"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-group/openim-rpc-group cmd/openim-rpc/openim-rpc-group/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-group/openim-rpc-group /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-group"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-msg/openim-rpc-msg cmd/openim-rpc/openim-rpc-msg/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-msg/openim-rpc-msg /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-msg"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-third/openim-rpc-third cmd/openim-rpc/openim-rpc-third/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-third/openim-rpc-third /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-third"]

@ -1,27 +0,0 @@
# build container
FROM golang:1.20-alpine3.18 AS builder
ENV GOPROXY https://goproxy.cn,direct
ENV GOSUMDB=sum.golang.google.cn
ENV GO111MODULE=on
WORKDIR /app
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add git pkgconfig build-base
ADD go.mod .
ADD go.sum .
RUN go mod download
ADD . .
RUN go build -o cmd/openim-rpc/openim-rpc-user/openim-rpc-user cmd/openim-rpc/openim-rpc-user/main.go
# archive container
FROM alpine:3.18
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk --no-cache add ca-certificates libdrm
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apk del tzdata
WORKDIR /app/bin
COPY --from=builder /app/cmd/openim-rpc/openim-rpc-user/openim-rpc-user /app/bin/
ENTRYPOINT ["/app/bin/openim-rpc-user"]
Loading…
Cancel
Save