Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>pull/437/head
parent
04264ae2e1
commit
cbb4d7f5ea
@ -1,4 +1,4 @@
|
|||||||
USER=root
|
USER=root
|
||||||
PASSWORD=openIM123
|
PASSWORD=openIM123
|
||||||
MINIO_ENDPOINT=http://127.0.0.1:10005
|
MINIO_ENDPOINT=http://113.90.81.237:10005
|
||||||
DATA_DIR=./
|
DATA_DIR=./
|
@ -1,19 +1,43 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
internet_ip=`curl ifconfig.me -s`
|
|
||||||
echo $internet_ip
|
|
||||||
|
|
||||||
|
# Get the external IP address
|
||||||
|
internet_ip=$(curl -s ifconfig.me)
|
||||||
|
|
||||||
|
# Print the IP address
|
||||||
|
echo "Internet IP address: ${internet_ip}"
|
||||||
|
|
||||||
|
# Read environment variables
|
||||||
source .env
|
source .env
|
||||||
echo $MINIO_ENDPOINT
|
|
||||||
if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then
|
|
||||||
sed -i "s/127.0.0.1/${internet_ip}/" .env
|
|
||||||
|
|
||||||
|
# Check if MINIO_ENDPOINT variable is set correctly
|
||||||
|
if [[ -z "${MINIO_ENDPOINT}" || "${MINIO_ENDPOINT}" != "http://127.0.0.1:10005" ]]; then
|
||||||
|
echo "Error: MINIO_ENDPOINT is not set or is not equal to http://127.0.0.1:10005."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd script ;
|
# Replace the IP address in the .env file
|
||||||
chmod +x *.sh ;
|
sed -i "s/127.0.0.1/${internet_ip}/" .env
|
||||||
|
|
||||||
|
# Enter the script directory
|
||||||
|
cd script || exit 1
|
||||||
|
|
||||||
|
# Add execute permission to scripts
|
||||||
|
chmod +x *.sh
|
||||||
|
|
||||||
|
# Initialize password
|
||||||
./init_pwd.sh
|
./init_pwd.sh
|
||||||
./env_check.sh;
|
|
||||||
cd .. ;
|
# Check environment variables
|
||||||
docker-compose up -d;
|
./env_check.sh
|
||||||
cd script ;
|
|
||||||
|
# Return to the parent directory
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
# Start docker containers
|
||||||
|
docker-compose up -d
|
||||||
|
|
||||||
|
# Enter the script directory
|
||||||
|
cd script || exit 1
|
||||||
|
|
||||||
|
# Check if docker services are running properly
|
||||||
./docker_check_service.sh
|
./docker_check_service.sh
|
||||||
|
Loading…
Reference in new issue