mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 21:02:11 +08:00
refactor
This commit is contained in:
parent
530f179526
commit
9e61bde44d
@ -14,12 +14,12 @@ WORKDIR /openim/openim-server
|
|||||||
# Copy all files to the container
|
# Copy all files to the container
|
||||||
ADD . .
|
ADD . .
|
||||||
|
|
||||||
RUN make clean
|
RUN Bash bootstrap.sh
|
||||||
RUN make build
|
RUN mage
|
||||||
|
|
||||||
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
|
FROM ghcr.io/openim-sigs/openim-ubuntu-image:latest
|
||||||
|
|
||||||
WORKDIR ${SERVER_WORKDIR}
|
WORKDIR ${`SERVER_WORKDIR`}
|
||||||
|
|
||||||
# Copy scripts and binary files to the production image
|
# Copy scripts and binary files to the production image
|
||||||
COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin
|
COPY --from=builder ${OPENIM_SERVER_BINDIR} /openim/openim-server/_output/bin
|
||||||
@ -27,4 +27,4 @@ COPY --from=builder ${OPENIM_SERVER_CMDDIR} /openim/openim-server/scripts
|
|||||||
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
COPY --from=builder ${SERVER_WORKDIR}/config /openim/openim-server/config
|
||||||
COPY --from=builder ${SERVER_WORKDIR}/deployments /openim/openim-server/deployments
|
COPY --from=builder ${SERVER_WORKDIR}/deployments /openim/openim-server/deployments
|
||||||
|
|
||||||
CMD ["/openim/openim-server/scripts/docker-start-all.sh"]
|
CMD ["cd /openim/openim-server/scripts/docker-start-all.sh"]
|
||||||
|
|||||||
@ -31,8 +31,8 @@ func TestLoadOpenIMRpcUserConfig(t *testing.T) {
|
|||||||
var user User
|
var user User
|
||||||
err := LoadConfig("../../../config/openim-rpc-user.yml", "IMENV_OPENIM_RPC_USER", &user)
|
err := LoadConfig("../../../config/openim-rpc-user.yml", "IMENV_OPENIM_RPC_USER", &user)
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
//IMENV_OPENIM_RPC_USER_RPC_LISTENIP
|
//export IMENV_OPENIM_RPC_USER_RPC_LISTENIP="0.0.0.0"
|
||||||
assert.Equal(t, "0.0.0.0", user.RPC.ListenIP)
|
assert.Equal(t, "0.0.0.0", user.RPC.ListenIP)
|
||||||
//export IMENV_OPENIM_RPC_USER_RPC_PORTS='10110,10111,10112'
|
//export IMENV_OPENIM_RPC_USER_RPC_PORTS="10110,10111,10112"
|
||||||
assert.Equal(t, []int{10110, 10111, 10112}, user.RPC.Ports)
|
assert.Equal(t, []int{10110, 10111, 10112}, user.RPC.Ports)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,9 +21,6 @@
|
|||||||
#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]}")/..
|
cd /openim/openim-server
|
||||||
source "${OPENIM_ROOT}/scripts/install/common.sh"
|
mage start
|
||||||
openim::log::info "\n# Use Docker to start all OpenIM service"
|
tail -f /dev/null
|
||||||
trap 'openim::util::onCtrlC' INT
|
|
||||||
"${OPENIM_ROOT}"/scripts/start-all.sh 2>&1 &
|
|
||||||
tail -f ${DOCKER_LOG_FILE}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user