From b262277ed9a0169e8c257f09356ee3d4c76d45f2 Mon Sep 17 00:00:00 2001 From: "Xinwei Xiong(cubxxw-openim)" <3293172751nss@gmail.com> Date: Wed, 5 Jul 2023 10:46:11 +0800 Subject: [PATCH] feat(main): optimize deployment (#36) Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com> --- README.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1db2e54..1722b44 100644 --- a/README.md +++ b/README.md @@ -42,21 +42,65 @@ ### ๐Ÿ“ฆ Installation ```bash -git clone https://https://github.com/OpenIMSDK/OpenKF +git clone https://github.com/OpenIMSDK/OpenKF openkf && export openkf=$(pwd)/openkf && cd $openkf && make ``` ### ๐Ÿš€ Run +> **Note**: +> We need to run the backend server first + ```bash -Note: we need to run the backend server first -cd server -go run main.go +make build +``` -open another terminal run the following command +> open another terminal run the following command + +```bash +# make dev cd web npm run dev ``` +### ๐Ÿ“– Contributors get up to speed + +Be good at using Makefile, it can ensure the quality of your project. + +```bash +Usage: make ... + +Targets: + all Build all the necessary targets. ๐Ÿ—๏ธ + build Build binaries by default. ๐Ÿ› ๏ธ + go.build Build the binary file of the specified platform. ๐Ÿ‘จโ€๐Ÿ’ป + build-multiarch Build binaries for multiple platforms. ๐ŸŒ + tidy tidy go.mod ๐Ÿ“ฆ + style Code style -> fmt,vet,lint ๐ŸŽจ + fmt Run go fmt against code. โœจ + vet Run go vet against code. ๐Ÿ” + generate Run go generate against code and docs. โœ… + lint Run go lint against code. ๐Ÿ”Ž + test Run unit test โœ”๏ธ + cover Run unit test with coverage. ๐Ÿงช + docker-build Build docker image with the manager. ๐Ÿณ + docker-push Push docker image with the manager. ๐Ÿ” + docker-buildx-push Push docker image with the manager using buildx. ๐Ÿšข + copyright-verify Validate boilerplate headers for assign files. ๐Ÿ“„ + copyright-add Add the boilerplate headers for all files. ๐Ÿ“ + swagger Generate swagger document. ๐Ÿ“š + serve-swagger Serve swagger spec and docs. ๐ŸŒ + clean Clean all builds. ๐Ÿงน + help Show this help info. โ„น๏ธ +``` + +> **Node**: +> It's highly recommended that you run `make all` before committing your code. ๐Ÿš€ + +```bash +make all +``` + + ## ๐Ÿ•‹ Architecture diagram ![Architecture](assets/images/architecture.png)