Coder Social home page Coder Social logo

cyq1162 / taurus.gateway Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 3.0 845 KB

Taurus.Gateway is a high-performance microservice gateway for asp.net or asp.net core(适合场景:对性能和并发有较高要求的电商、站点、WebAPI等系统,支持 .Net Core 系列)

License: GNU General Public License v3.0

taurus.gateway's Introduction

Taurus.Gateway is a microservice gateway for asp.net or asp.net core

中文 | English


# Taurus.Gateway 微服务网关,使用 .Net Core 示例:

1、以 Docker 中拉取镜像运行:

下载镜像,当前【2024-01-23 发布的版本是3.3.0.1】:

docker pull registry.cn-hangzhou.aliyuncs.com/taurus-netcore/taurus.gateway:3.3.0.1

下载完成后,查看已下载的镜像列表:

docker images

运行容器,网关需要对外,映射使用80和443端口【默认镜像中的应用打包运行的监听端口为:8080 和 443】:

下面命令行将[ImageID]换成下载的镜像ID

docker run -d -p 80:8080 -p 443:443 --name=gateway --security-opt seccomp=unconfined [ImageID]

启动后,通过以下命令查看容器是否正常运行:

docker ps -a 

2、以工程文件运行:进入 src 目录下,运行工程文件:

默认运行环境是当前最新的 .net core 8 版本,程序主要依赖 Taurus.Mvc 的 Nuget 包。

可以根据需要自行创建工程文件,引用 Taurus.Mvc 的 Nuget 包即可,该包支持.net 和 .net core 几乎所有版本。

3、程序启动正常时,先以 http 访问:

默认主页显示为:404,没有可显示页面,需要手动输入以下网址进入后台:/admin/login

默认账号:admin,密码空,直接点登陆即可进入后台。

4、配置注册中心Url,以获取配置信息:

配置项为:MicroService.Server.RcUrl,界面配置始下:

配置成功后,可以查看获取到的配置信息:

5、配置证书,以开启 https SSL 访问。

在/admin/config keystrel 配置项中,直接上传证书文件:

zip 可包含一个或多个证书内容如下,如xxx.zip 包含:


证书文件:www.samples.com.pfx
密码文件:www.samples.com.txt

上传成功后,首次需要重启程序,以启动https监听。

6、Taurus.RegistryCenter:微服务注册中心(配套系列)

网关使用地址:https://github.com/cyq1162/Taurus.RegistryCenter

7、Taurus 微服务客户端(配套系列)

见:/demo 运行示例。

7、更多教程地址,见作者博客

https://www.cnblogs.com/cyq1162/category/2205668.html

taurus.gateway's People

Contributors

cyq1162 avatar

Stargazers

Crash.Y avatar  avatar Dong A. avatar  avatar  avatar Xiang YiSheng avatar Jobc avatar LannyKing avatar  avatar Eric Tao avatar 阿轩 avatar  avatar

Watchers

James Cloos avatar lmx avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.