mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
fix: adjust the order: first replace the values in the .env file, then replace the configuration in the config file
This commit is contained in:
parent
0feb950c5a
commit
923023271a
@ -37,6 +37,15 @@ function onCtrlC () {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Replace local IP address with the public IP address in .env file
|
||||||
|
if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then
|
||||||
|
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
|
||||||
|
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the public internet IP address
|
# Get the public internet IP address
|
||||||
internet_ip=$(curl ifconfig.me -s)
|
internet_ip=$(curl ifconfig.me -s)
|
||||||
echo -e "${PURPLE_PREFIX}=========> Your public internet IP address is ${internet_ip} ${COLOR_SUFFIX} \n"
|
echo -e "${PURPLE_PREFIX}=========> Your public internet IP address is ${internet_ip} ${COLOR_SUFFIX} \n"
|
||||||
@ -59,15 +68,6 @@ echo -e "${PURPLE_PREFIX}=========> env_check.sh ${COLOR_SUFFIX} \n"
|
|||||||
|
|
||||||
${SCRIPTS_ROOT}/env_check.sh
|
${SCRIPTS_ROOT}/env_check.sh
|
||||||
|
|
||||||
# Replace local IP address with the public IP address in .env file
|
|
||||||
if [ $API_URL == "http://127.0.0.1:10002/object/" ]; then
|
|
||||||
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
|
|
||||||
sed -i "s/127.0.0.1/${internet_ip}/" ${OPENIM_ROOT}/.env
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Go back to the previous directory
|
# Go back to the previous directory
|
||||||
cd ${OPENIM_ROOT}
|
cd ${OPENIM_ROOT}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user