diff --git a/.env b/.env index d77763a3d..cc42fbcb7 100644 --- a/.env +++ b/.env @@ -29,12 +29,12 @@ PASSWORD=openIM123 MINIO_ENDPOINT=http://172.28.0.1:10005 # Base URL for the application programming interface (API). -# Default: API_URL=http://172.28.0.1:10002 -API_URL=http://14.155.59.99:10002 +# Default: API_URL=http://172.0.0.1:10002 +API_URL=http://172.0.0.1:10002 # Directory path for storing data files or related information. # Default: DATA_DIR=./ -DATA_DIR=/root/workspaces/openim/open-im-server +DATA_DIR=./ # Choose the appropriate image address, the default is GITHUB image, # you can choose docker hub, for Chinese users can choose Ali Cloud diff --git a/README.md b/README.md index 1e9f98adb..722de0240 100644 --- a/README.md +++ b/README.md @@ -204,15 +204,33 @@ If you'd like to contribute to this Open-IM-Server repository, please read our [ Before you start, please make sure your changes are in demand. The best for that is to create a [new discussion](https://github.com/openimsdk/open-im-server/discussions/new/choose) OR [Slack Communication](https://join.slack.com/t/openimsdk/shared_invite/zt-22720d66b-o_FvKxMTGXtcnnnHiMqe9Q), or if you find an issue, [report it](https://github.com/openimsdk/open-im-server/issues/new/choose) first. -- [Code Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/go-code.md) -- [Docker Images Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/images.md) -- [Directory Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/directory.md) -- [Commit Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/commit.md) -- [Versioning Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/version.md) -- [Interface Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/api.md) -- [Log Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/logging.md) -- [Error Code Standards](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/error-code.md) -- [OpenIM configuration and environment variable Settings](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/environment.md) +- [OpenIM API Reference](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/api.md) +- [OpenIM Bash Logging](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/bash-log.md) +- [OpenIM CI/CD Actions](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/cicd-actions.md) +- [OpenIM Code Conventions](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/code-conventions.md) +- [OpenIM Commit Guidelines](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/commit.md) +- [OpenIM Development Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/development.md) +- [OpenIM Directory Structure](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/directory.md) +- [OpenIM Environment Setup](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/environment.md) +- [OpenIM Error Code Reference](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/error-code.md) +- [OpenIM Git Workflow](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/git-workflow.md) +- [OpenIM Git Cherry Pick Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/gitcherry-pick.md) +- [OpenIM GitHub Workflow](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/github-workflow.md) +- [OpenIM Go Code Standards](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/go-code.md) +- [OpenIM Image Guidelines](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/images.md) +- [OpenIM Initial Configuration](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/init-config.md) +- [OpenIM Docker Installation Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/install-docker.md) +- [OpenIM OpenIM Linux System Installation](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/install-openim-linux-system.md) +- [OpenIM Linux Development Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/linux-development.md) +- [OpenIM Local Actions Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/local-actions.md) +- [OpenIM Logging Conventions](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/logging.md) +- [OpenIM Offline Deployment](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/offline-deployment.md) +- [OpenIM Protoc Tools](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/protoc-tools.md) +- [OpenIM Testing Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/test.md) +- [OpenIM Utility Go](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/util-go.md) +- [OpenIM Makefile Utilities](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/util-makefile.md) +- [OpenIM Script Utilities](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/util-scripts.md) +- [OpenIM Versioning](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/version.md) ## :busts_in_silhouette: Community diff --git a/config/config.yaml b/config/config.yaml index 0c001e548..2964522fb 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -135,14 +135,14 @@ api: # minio.signEndpoint is minio public network address object: enable: "minio" - apiURL: "http://14.155.59.99:10002" + apiURL: "http://127.0.0.1:10002" minio: bucket: "openim" endpoint: "http://172.28.0.1:10005" accessKeyID: "root" secretAccessKey: "openIM123" sessionToken: '' - signEndpoint: "http://14.155.59.99:10005" + signEndpoint: "http://127.0.0.1:10005" publicRead: false cos: bucketURL: https://temp-1252357374.cos.ap-chengdu.myqcloud.com @@ -198,7 +198,7 @@ rpcRegisterName: # Whether to output in json format # Whether to include stack trace in logs log: - storageLocation: /root/workspaces/openim/open-im-server/logs/ + storageLocation: ./logs/ rotationTime: 24 remainRotationCount: 2 remainLogLevel: 6 diff --git a/docs/README.md b/docs/README.md index 75f56e847..32fc8d015 100644 --- a/docs/README.md +++ b/docs/README.md @@ -32,8 +32,8 @@ This section offers developers a detailed guide on how to contribute code, set u This section introduces various conventions and policies within OpenIM, encompassing code, logs, versions, and more. - [API Conversions](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/api.md) - Guidelines and methods for API conversions. -- [Logging Policy](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/bash_log.md) - Logging policies and conventions in OpenIM. -- [CI/CD Actions](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/cicd_actions.md) - Procedures and conventions for CI/CD. +- [Logging Policy](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/bash-log.md) - Logging policies and conventions in OpenIM. +- [CI/CD Actions](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/cicd-actions.md) - Procedures and conventions for CI/CD. - [Commit Conventions](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/commit.md) - Conventions for code commits in OpenIM. - [Directory Conventions](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/directory.md) - Directory structure and conventions within OpenIM. - [Error Codes](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/error-code.md) - List and descriptions of error codes. @@ -57,7 +57,7 @@ If you're a developer or someone keen on contributing: As a community maintainer: - Ensure that contributions align with the standards outlined in our documentation. -- Regularly review the [Logging Policy](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/bash_log.md) and [Error Codes](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/error-code.md) to stay updated. +- Regularly review the [Logging Policy](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/bash-log.md) and [Error Codes](https://github.com/openimsdk/open-im-server/blob/main/docs/contrib/error-code.md) to stay updated. ## For Users diff --git a/docs/contrib/README.md b/docs/contrib/README.md index 1148318dc..5fd4a1fa2 100644 --- a/docs/contrib/README.md +++ b/docs/contrib/README.md @@ -1,10 +1,42 @@ -## OpenIM Project Development Standards +# Contrib Documentation Index -- [Code Standards](./go-code.md) -- [Docker Images Standards](./images.md) -- [Directory Standards](./directory.md) -- [Commit Standards](./commit.md) -- [Versioning Standards](./version.md) -- [Interface Standards](./api.md) -- [Log Standards](./log.md) -- [Error Code Standards](./error-code.md) +## ๐Ÿ“š General Information +- [๐Ÿ“„ README](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/README.md) - General introduction to the contribution documentation. +- [๐Ÿ“‘ Development Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/development.md) - Guidelines for setting up a development environment. + +## ๐Ÿ›  Setup and Installation +- [๐ŸŒ Environment Setup](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/environment.md) - Instructions on setting up the development environment. +- [๐Ÿณ Docker Installation Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/install-docker.md) - Steps to install Docker for container management. +- [๐Ÿ”ง OpenIM Linux System Installation](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/install-openim-linux-system.md) - Guide for installing OpenIM on a Linux system. + +## ๐Ÿ’ป Development Practices +- [๐Ÿ‘จโ€๐Ÿ’ป Code Conventions](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/code-conventions.md) - Coding standards to follow for consistency. +- [๐Ÿ“ Directory Structure](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/directory.md) - Explanation of the repository's directory layout. +- [๐Ÿ”€ Git Workflow](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/git-workflow.md) - The workflow for using Git in this project (note the file extension error). +- [๐Ÿ’พ GitHub Workflow](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/github-workflow.md) - Workflow guidelines for GitHub. + +## ๐Ÿงช Testing and Deployment +- [โš™๏ธ CI/CD Actions](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/cicd-actions.md) - Continuous integration and deployment configurations. +- [๐Ÿš€ Offline Deployment](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/offline-deployment.md) - How to deploy the application offline. + +## ๐Ÿ”ง Utilities and Tools +- [๐Ÿ“ฆ Protoc Tools](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/protoc-tools.md) - Protobuf compiler-related utilities. +- [๐Ÿ”จ Utility Go](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/util-go.md) - Go utilities and helper functions. +- [๐Ÿ›  Makefile Utilities](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/util-makefile.md) - Makefile scripts for automation. +- [๐Ÿ“œ Script Utilities](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/util-scripts.md) - Utility scripts for development. + +## ๐Ÿ“‹ Standards and Conventions +- [๐Ÿšฆ Commit Guidelines](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/commit.md) - Standards for writing commit messages. +- [โœ… Testing Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/test.md) - Guidelines and conventions for writing tests. +- [๐Ÿ“ˆ Versioning](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/version.md) - Version management for the project. + +## ๐Ÿ–ผ Additional Resources +- [๐ŸŒ API Reference](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/api.md) - Detailed API documentation. +- [๐Ÿ“š Go Code Standards](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/go-code.md) - Go programming language standards. +- [๐Ÿ–ผ Image Guidelines](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/images.md) - Guidelines for image assets. + +## ๐Ÿ› Troubleshooting +- [๐Ÿ” Error Code Reference](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/error-code.md) - List of error codes and their meanings. +- [๐Ÿš Bash Logging](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/bash-log.md) - Logging standards for bash scripts. +- [๐Ÿ“ˆ Logging Conventions](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/logging.md) - Conventions for application logging. +- [๐Ÿ›  Local Actions Guide](https://github.com/openimsdk/open-im-server/tree/main/docs/contrib/local-actions.md) - How to perform local actions for troubleshooting. diff --git a/docs/contrib/bash_log.md b/docs/contrib/bash-log.md similarity index 100% rename from docs/contrib/bash_log.md rename to docs/contrib/bash-log.md diff --git a/docs/contrib/cicd_actions.md b/docs/contrib/cicd-actions.md similarity index 100% rename from docs/contrib/cicd_actions.md rename to docs/contrib/cicd-actions.md diff --git a/docs/contrib/code-conventions.md b/docs/contrib/code-conventions.md index 39bec1114..049df6381 100644 --- a/docs/contrib/code-conventions.md +++ b/docs/contrib/code-conventions.md @@ -24,7 +24,48 @@ - Do not use uppercase characters, underscores, or dashes in package names. - Please consider parent directory name when choosing a package name. For example, `pkg/controllers/autoscaler/foo.go` should say `package autoscaler` not `package autoscalercontroller`. - Unless there's a good reason, the `package foo` line should match the name of the directory in which the `.go` file exists. - - Importers can use a different name if they need to disambiguate. + - Importers can use a different name if they need to disambiguate.โ“‚๏ธ + +## OpenIM Naming Conventions Guide + +Welcome to the OpenIM Naming Conventions Guide. This document outlines the best practices and standardized naming conventions that our project follows to maintain clarity, consistency, and alignment with industry standards, specifically taking cues from the Google Naming Conventions. + +### 1. General File Naming + +Files within the OpenIM project should adhere to the following rules: + ++ Both hyphens (`-`) and underscores (`_`) are acceptable in file names. ++ Underscores (`_`) are preferred for general files to enhance readability and compatibility. ++ For example: `data_processor.py`, `user_profile_generator.go` + +### 2. Special File Types + +#### a. Script and Markdown Files + ++ Bash scripts and Markdown files should use hyphens (`-`) to facilitate better searchability and compatibility in web browsers. ++ For example: `deploy-script.sh`, `project-overview.md` + +#### b. Uppercase Markdown Documentation + ++ Markdown files with uppercase names, such as `README`, may include underscores (`_`) to separate words if necessary. ++ For example: `README_SETUP.md`, `CONTRIBUTING_GUIDELINES.md` + +### 3. Directory Naming + ++ Directories must use hyphens (`-`) exclusively to maintain a clean and organized file structure. ++ For example: `image-assets`, `user-data` + +### 4. Configuration Files + ++ Configuration files, including but not limited to `.yaml` files, should use hyphens (`-`). ++ For example: `app-config.yaml`, `logging-config.yaml` + +### Best Practices + ++ Keep names concise but descriptive enough to convey the file's purpose or contents at a glance. ++ Avoid using spaces in names; use hyphens or underscores instead to improve compatibility across different operating systems and environments. ++ Stick to lowercase naming where possible for consistency and to prevent issues with case-sensitive systems. ++ Include version numbers or dates in file names if the file is subject to updates, following the format: `project-plan-v1.2.md` or `backup-2023-03-15.sql`. ## Directory and file conventions diff --git a/docs/contrib/git-workflow.md.md b/docs/contrib/git-workflow.md similarity index 100% rename from docs/contrib/git-workflow.md.md rename to docs/contrib/git-workflow.md diff --git a/scripts/README.md b/scripts/README.md index b19717fd9..242e76017 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -123,7 +123,7 @@ Each directory and script in the structure should be understood as a part of a l **PATH:** `scripts/lib/logging.sh` -+ [log details](../docs/contrib/bash_log.md) ++ [log details](../docs/contrib/bash-log.md) ## Supported platforms