Add feature: Replace apiURL (in config.yaml) with an external IP address

pull/528/head
skiffer-git 1 year ago
parent 62cd1dace0
commit b46f3410ad

@ -1,4 +1,5 @@
USER=root
PASSWORD=openIM123
MINIO_ENDPOINT=http://127.0.0.1:10005
API_URL=http://127.0.0.1:10002/object/
DATA_DIR=./

@ -9,6 +9,10 @@ source .env
echo $MINIO_ENDPOINT
# 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}/" .env
fi
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
sed -i "s/127.0.0.1/${internet_ip}/" .env
fi

@ -51,6 +51,8 @@ sed -i '/redis:/,/password:/s/password: .*/password: '${PASSWORD}'/' $config_fil
sed -i "/minio:/,/isDistributedMod:/ s/accessKeyID:.*/accessKeyID: $USER/" $config_file
sed -i "/minio:/,/isDistributedMod:/ s/secretAccessKey:.*/secretAccessKey: $PASSWORD/" $config_file
sed -i '/minio:/,/endpoint:/s|endpoint: .*|endpoint: '${MINIO_ENDPOINT}'|' $config_file
sed -i '/object:/,/apiURL:/s|apiURL: .*|apiURL: '${API_URL}'|' $config_file
# Replace secret for token
sed -i "s/secret: .*/secret: $PASSWORD/" $config_file

Loading…
Cancel
Save