From cd72a28bb74b08a2d5e567c5717f93b4cc46f4dd Mon Sep 17 00:00:00 2001 From: viletyy Date: Tue, 15 Jun 2021 21:43:10 +0800 Subject: [PATCH] fix: some config and readme --- .gitignore | 3 ++- README.md | 25 +++++++++++++++++++++++-- config.yaml.example | 2 ++ 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 08c7ba8..3b10cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ vendor/* config.yaml go.sum __debug_bin -latest_log \ No newline at end of file +latest_log +potato \ No newline at end of file diff --git a/README.md b/README.md index 76fbbcc..25ba345 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Potato @@ -51,13 +51,34 @@ potato ## 安装 -这个项目使用 [go](https://golang.org/) 和 [swag](https://github.com/swaggo/swag)。请确保你本地安装了它们。 +这个项目使用 [go](https://golang.org/) 、 [swag](https://github.com/swaggo/swag)、[docker](https://www.docker.com/)[下载地址](https://www.docker.com/products/docker-desktop)、[jaeger](https://www.jaegertracing.io/)。请确保你本地安装了它们。 +go ```sh $ tar -C /usr/local -xzf go1.4.linux-amd64.tar.gz $ export PATH=$PATH:/usr/local/go/bin ``` +swag安装 +```sh +$ go get -u github.com/swaggo/swag/cmd/swag +$ mv $GOPATH/bin/swag /usr/local/go/bin +``` + +jaeger +```sh +docker run -d --name jaeger \ +-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \ +-p 5775:5775/udp \ +-p 6831:6831/udp \ +-p 6832:6832/udp \ +-p 5778:5778 \ +-p 16686:16686 \ +-p 14268:14268 \ +-p 9411:9411 \ +jaegertracing/all-in-one:1.16 +``` + ## 使用说明 ```sh diff --git a/config.yaml.example b/config.yaml.example index 4bb59aa..5ef4415 100644 --- a/config.yaml.example +++ b/config.yaml.example @@ -1,6 +1,7 @@ app: name: 'potato' version: '1.0.0' + domain: '127.0.0.1' jwt_secret: 'viletyy' jwt_expire: '7200' run_mode: 'debug' @@ -14,6 +15,7 @@ server: http_port: 8000 read_timeout: 60 write_timeout: 60 + tracer_host_port: '127.0.0.1:6831' email: host: 'smtp.163.com' port: 465