diff --git a/assets/README.md b/assets/README.md new file mode 100644 index 000000000..d3e735dc0 --- /dev/null +++ b/assets/README.md @@ -0,0 +1,32 @@ +# `/assets` + +The `/assets` directory in the OpenIM repository contains various assets such as images, logos, and animated GIFs. These assets serve different purposes and contribute to the functionality and aesthetics of the OpenIM project. + +## Directory Structure: + +```bash +assets/ +├── README.md # Documentation for the assets directory +├── images # Directory holding images related to OpenIM +│ ├── architecture.png # Image depicting the architecture of OpenIM +│ └── mvc.png # Image illustrating the Model-View-Controller (MVC) pattern +├── intive-slack.png # Image displaying the Intive Slack logo +├── logo # Directory containing various logo variations for OpenIM +│ ├── openim-logo-black.png # OpenIM logo with a black background +│ ├── openim-logo-blue.png # OpenIM logo with a blue background +│ ├── openim-logo-green.png # OpenIM logo with a green background +│ ├── openim-logo-purple.png # OpenIM logo with a purple background +│ ├── openim-logo-white.png # OpenIM logo with a white background +│ ├── openim-logo-yellow.png # OpenIM logo with a yellow background +│ └── openim-logo.png # OpenIM logo with a transparent background +└── logo-gif # Directory containing animated GIF versions of the OpenIM logo + └── openim-log.gif # Animated OpenIM logo with a transparent background +``` + +## Copyright Notice: + +The OpenIM logo, including its variations and animated versions, displayed in this repository [OpenIM](https://github.com/OpenIMSDK/openim) under the `/assets/logo` and `/assets/logo-gif` directories, are protected by copyright laws. + +The logo design is credited to @Xx(席欣). + +Please respect the intellectual property rights and refrain from unauthorized use and distribution of these assets. \ No newline at end of file diff --git a/assets/intive-slack.png b/assets/intive-slack.png new file mode 100644 index 000000000..3f27e0c69 Binary files /dev/null and b/assets/intive-slack.png differ diff --git a/assets/logo-gif/LICENSE b/assets/logo-gif/LICENSE new file mode 100644 index 000000000..fe61855c2 --- /dev/null +++ b/assets/logo-gif/LICENSE @@ -0,0 +1 @@ +# The OpenIM logo files are licensed under a choice of either Apache-2.0 or CC-BY-4.0 (Creative Commons Attribution 4.0 International). \ No newline at end of file diff --git a/assets/logo-gif/openim-logo.gif b/assets/logo-gif/openim-logo.gif new file mode 100644 index 000000000..779789641 Binary files /dev/null and b/assets/logo-gif/openim-logo.gif differ diff --git a/assets/logo/LICENSE b/assets/logo/LICENSE new file mode 100644 index 000000000..fe61855c2 --- /dev/null +++ b/assets/logo/LICENSE @@ -0,0 +1 @@ +# The OpenIM logo files are licensed under a choice of either Apache-2.0 or CC-BY-4.0 (Creative Commons Attribution 4.0 International). \ No newline at end of file diff --git a/assets/logo/openim-logo-blue.png b/assets/logo/openim-logo-blue.png new file mode 100644 index 000000000..555bde4be Binary files /dev/null and b/assets/logo/openim-logo-blue.png differ diff --git a/assets/logo/openim-logo-cyan.png b/assets/logo/openim-logo-cyan.png new file mode 100644 index 000000000..a27807f83 Binary files /dev/null and b/assets/logo/openim-logo-cyan.png differ diff --git a/assets/logo/openim-logo-gradient.png b/assets/logo/openim-logo-gradient.png new file mode 100644 index 000000000..40198d531 Binary files /dev/null and b/assets/logo/openim-logo-gradient.png differ diff --git a/assets/logo/openim-logo-green.png b/assets/logo/openim-logo-green.png new file mode 100644 index 000000000..d071443c2 Binary files /dev/null and b/assets/logo/openim-logo-green.png differ diff --git a/assets/logo/openim-logo-orange.png b/assets/logo/openim-logo-orange.png new file mode 100644 index 000000000..398d9d63a Binary files /dev/null and b/assets/logo/openim-logo-orange.png differ diff --git a/assets/logo/openim-logo-purple.png b/assets/logo/openim-logo-purple.png new file mode 100644 index 000000000..f08dd8acd Binary files /dev/null and b/assets/logo/openim-logo-purple.png differ diff --git a/assets/logo/openim-logo-red.png b/assets/logo/openim-logo-red.png new file mode 100644 index 000000000..eb1e54251 Binary files /dev/null and b/assets/logo/openim-logo-red.png differ diff --git a/assets/logo/openim-logo-yellow.png b/assets/logo/openim-logo-yellow.png new file mode 100644 index 000000000..7440e3c63 Binary files /dev/null and b/assets/logo/openim-logo-yellow.png differ diff --git a/assets/logo/openim-logo.png b/assets/logo/openim-logo.png new file mode 100644 index 000000000..cc87f0ac3 Binary files /dev/null and b/assets/logo/openim-logo.png differ diff --git a/install_im_server.sh b/install_im_server.sh index fe219c967..b08597e80 100644 --- a/install_im_server.sh +++ b/install_im_server.sh @@ -1,27 +1,39 @@ #!/usr/bin/env bash -internet_ip=`curl ifconfig.me -s` + +# Get the public internet IP address +internet_ip=$(curl ifconfig.me -s) echo $internet_ip +# Load environment variables from .env file 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 +# Replace local IP address with the public IP address in .env file +if [ $MINIO_ENDPOINT == "http://127.0.0.1:10005" ]; then + sed -i "s/127.0.0.1/${internet_ip}/" .env fi - -cd scripts ; -chmod +x *.sh ; + +# Change directory to scripts folder +cd scripts +chmod +x *.sh + +# Execute necessary scripts ./init_pwd.sh -./env_check.sh; -cd .. ; +./env_check.sh + +# Go back to the previous directory +cd .. +# Check if docker-compose command is available if command -v docker-compose &> /dev/null then - docker-compose up -d ; + docker-compose up -d else - docker compose up -d ; + docker compose up -d fi +# Change directory to scripts folder again +cd scripts -cd scripts ; -./docker_check_service.sh +# Check docker services +./docker_check_service.sh \ No newline at end of file diff --git a/pkg/common/db/relation/mysql_init.go b/pkg/common/db/relation/mysql_init.go index fe467b675..d480ae6e8 100644 --- a/pkg/common/db/relation/mysql_init.go +++ b/pkg/common/db/relation/mysql_init.go @@ -34,7 +34,7 @@ const ( maxRetry = 100 ) -//newMysqlGormDB Initialize the database connection +// newMysqlGormDB Initialize the database connection func newMysqlGormDB() (*gorm.DB, error) { dsn := fmt.Sprintf("%s:%s@tcp(%s)/%s?charset=utf8mb4&parseTime=true&loc=Local", config.Config.Mysql.Username, config.Config.Mysql.Password, config.Config.Mysql.Address[0], "mysql") @@ -84,7 +84,7 @@ func newMysqlGormDB() (*gorm.DB, error) { return db, nil } -//connectToDatabase Connection retry for mysql +// connectToDatabase Connection retry for mysql func connectToDatabase(dsn string, maxRetry int) (*gorm.DB, error) { var db *gorm.DB var err error