@@ -12,8 +12,8 @@ WORKDIR /go/release | |||||
# 把全部文件添加到/go/release目录 | # 把全部文件添加到/go/release目录 | ||||
ADD . . | ADD . . | ||||
# 编译:把main.go编译成可执行的二进制文件,命名为zyos | |||||
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o zyos cmd/business/main.go | |||||
# 编译:把main.go编译成可执行的二进制文件,命名为egg_im | |||||
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg_im cmd/business/main.go | |||||
FROM ubuntu:xenial as prod | FROM ubuntu:xenial as prod | ||||
LABEL maintainer="dengbiao" | LABEL maintainer="dengbiao" | ||||
@@ -25,7 +25,7 @@ RUN rm -f /etc/localtime \ | |||||
&& echo $TZ > /etc/timezone | && echo $TZ > /etc/timezone | ||||
# 在build阶段复制可执行的go二进制文件app | # 在build阶段复制可执行的go二进制文件app | ||||
COPY --from=build /go/release/zyos ./zyos | |||||
COPY --from=build /go/release/egg_im ./egg_im | |||||
# 启动服务 | # 启动服务 | ||||
# 优化内核参数 | # 优化内核参数 | ||||
@@ -33,5 +33,5 @@ COPY --from=build /go/release/zyos ./zyos | |||||
#RUN sysctl -w net.ipv4.tcp_tw_recycle=1 | #RUN sysctl -w net.ipv4.tcp_tw_recycle=1 | ||||
#RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 | #RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 | ||||
#RUN sysctl -p | #RUN sysctl -p | ||||
#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./zyos"] | |||||
CMD ["./zyos"] | |||||
#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg_im"] | |||||
CMD ["./egg_im"] |
@@ -12,8 +12,8 @@ WORKDIR /go/release | |||||
# 把全部文件添加到/go/release目录 | # 把全部文件添加到/go/release目录 | ||||
ADD . . | ADD . . | ||||
# 编译:把main.go编译成可执行的二进制文件,命名为zyos | |||||
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o zyos cmd/connect/main.go | |||||
# 编译:把main.go编译成可执行的二进制文件,命名为egg_im | |||||
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg_im cmd/connect/main.go | |||||
FROM ubuntu:xenial as prod | FROM ubuntu:xenial as prod | ||||
LABEL maintainer="dengbiao" | LABEL maintainer="dengbiao" | ||||
@@ -25,7 +25,7 @@ RUN rm -f /etc/localtime \ | |||||
&& echo $TZ > /etc/timezone | && echo $TZ > /etc/timezone | ||||
# 在build阶段复制可执行的go二进制文件app | # 在build阶段复制可执行的go二进制文件app | ||||
COPY --from=build /go/release/zyos ./zyos | |||||
COPY --from=build /go/release/egg_im ./egg_im | |||||
# 启动服务 | # 启动服务 | ||||
# 优化内核参数 | # 优化内核参数 | ||||
@@ -33,5 +33,5 @@ COPY --from=build /go/release/zyos ./zyos | |||||
#RUN sysctl -w net.ipv4.tcp_tw_recycle=1 | #RUN sysctl -w net.ipv4.tcp_tw_recycle=1 | ||||
#RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 | #RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 | ||||
#RUN sysctl -p | #RUN sysctl -p | ||||
#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./zyos"] | |||||
CMD ["./zyos"] | |||||
#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg_im"] | |||||
CMD ["./egg_im"] |
@@ -12,8 +12,8 @@ WORKDIR /go/release | |||||
# 把全部文件添加到/go/release目录 | # 把全部文件添加到/go/release目录 | ||||
ADD . . | ADD . . | ||||
# 编译:把main.go编译成可执行的二进制文件,命名为zyos | |||||
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o zyos cmd/logic/main.go | |||||
# 编译:把main.go编译成可执行的二进制文件,命名为egg_im | |||||
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o egg_im cmd/logic/main.go | |||||
FROM ubuntu:xenial as prod | FROM ubuntu:xenial as prod | ||||
LABEL maintainer="dengbiao" | LABEL maintainer="dengbiao" | ||||
@@ -25,7 +25,7 @@ RUN rm -f /etc/localtime \ | |||||
&& echo $TZ > /etc/timezone | && echo $TZ > /etc/timezone | ||||
# 在build阶段复制可执行的go二进制文件app | # 在build阶段复制可执行的go二进制文件app | ||||
COPY --from=build /go/release/zyos ./zyos | |||||
COPY --from=build /go/release/egg_im ./egg_im | |||||
# 启动服务 | # 启动服务 | ||||
# 优化内核参数 | # 优化内核参数 | ||||
@@ -33,5 +33,5 @@ COPY --from=build /go/release/zyos ./zyos | |||||
#RUN sysctl -w net.ipv4.tcp_tw_recycle=1 | #RUN sysctl -w net.ipv4.tcp_tw_recycle=1 | ||||
#RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 | #RUN sysctl -w net.ipv4.ip_local_port_range=1024 65535 | ||||
#RUN sysctl -p | #RUN sysctl -p | ||||
#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./zyos"] | |||||
CMD ["./zyos"] | |||||
#CMD ["bash","-c","sysctl -w net.ipv4.tcp_timestamps=1 && sysctl -w net.ipv4.tcp_tw_reuse=1 && sysctl -w net.ipv4.tcp_tw_timeout=10 && sysctl -w net.ipv4.tcp_fin_timeout=10 && sysctl -w net.ipv4.ip_local_port_range='1024 65535' && ./egg_im"] | |||||
CMD ["./egg_im"] |
@@ -34,7 +34,6 @@ func TestUserExtServer_SignIn(t *testing.T) { | |||||
resp, err := getBusinessExtClient().SignIn(getCtx(), &pb.SignInReq{ | resp, err := getBusinessExtClient().SignIn(getCtx(), &pb.SignInReq{ | ||||
PhoneNumber: "18229775311", | PhoneNumber: "18229775311", | ||||
DeviceId: 1, | DeviceId: 1, | ||||
MasterId: 123456, | |||||
}) | }) | ||||
if err != nil { | if err != nil { | ||||
fmt.Println(err) | fmt.Println(err) | ||||